Open Closed

Regarding 2 Factor Authentication #768


User avatar
0
ChetanKumbhar created

We have some questions regarding 2FA. We created project using angular.

  1. Our need to implement 2FA with only email id...Can we implement 2FA with only email id.?
  2. Our log in page is customized , how we can get that pages of 2FA in our project.
  3. What technical changes we required?
  4. Which version on abp is required for this?

Is there chat option for quick response?

Thanks Chetan Kumbhar.


17 Answer(s)
  • User Avatar
    0
    yekalkan created
    Support Team Fullstack Developer

    Our need to implement 2FA with only email id...Can we implement 2FA with only email id.?

    See my answer at https://support.abp.io/QA/Questions/767/Regarding-2-factor-authentication

    Our log in page is customized , how we can get that pages of 2FA in our project.

    Can you give more detail?

  • User Avatar
    0
    ChetanKumbhar created

    Hi, Our Login page is in angular project. In that we have used account component. my questions are like.

    1. we are using version 3.0.4, it is okay to implement 2FA or we have to upgrade, from which version we use 2FA.
    2. How we get that 2FA pages in to our application.
    3. We have separate email service, how to integrate with that pages

    Thanks Chetan Kumbhar.

  • User Avatar
    0
    ChetanKumbhar created

    Hello,

    Any update on this from suppot team

  • User Avatar
    0
    armanozak created

    Hi,

    I will try to cover the Angular part of the question.

    2FA is not available in password flow. You will need to use code flow authentication and, when you do that, the MVC login is used instead of Angular login. Therefore, customizations has to be made on the MVC login page.

  • User Avatar
    0
    ChetanKumbhar created

    Hi,

    Thanks, so, means we can not implement 2FA, if we are using Identity Server Seperated (Angular)? can you clear me bit more on it?

  • User Avatar
    0
    ChetanKumbhar created

    we do not use MVC. we have angular/API.

    kindly confirm me whether will it possible in angular/api.

    thanks chetan kumbhar.

  • User Avatar
    0
    armanozak created

    Hi,

    You can use Angular for the rest of your app and implement 2FA. Only the login page will be MVC.

  • User Avatar
    0
    ChetanKumbhar created

    Hi,

    It means we can not implement 2FA in angular log in page? we must have to use MVC log in page to implement 2FA?

    Kindly confirm.

    I have explained below, what we have done https://support.abp.io/QA/Questions/779/About-2-factor-authentication

  • User Avatar
    0
    ChetanKumbhar created

    Hi,

    Our code base is in angular. I haave two questions

    1. If we upgrade angular to latest version will it be posslible to implement 2FA in angular? if yes, kindly let me know how to do that, becasue we can not use MVC.

    2. If not how to it in MVC.

    Can we have online session. Because this is on priority level.

    Thanks & Regards, Chetan Kumbhar.

  • User Avatar
    0
    armanozak created

    Hi,

    For 2FA, code flow is required. When using code flow, your Angular application redirects the user to a login page made with MVC. This is why, customization of the login page must be done using MVC. Upgrading Angular to latest version will not change this.

    How to customize that login page in MVC is out of my expertise, so I have assigned the question to a colleague who can answer that.

  • User Avatar
    0
    ChetanKumbhar created

    Hi,

    What is code flow? how should we implement that in our application? how to do it in MVC? can we have online session for this, it is bit on priority?

  • User Avatar
    0
    armanozak created

    Hi,

    It is the default setting in application template as of v3.1 and, normally, you don't have to do anything about it. If the oAuthConfig option in your environment.ts looks similar to the following, that means you are using code flow.

    import { Config } from '@abp/ng.core';
    
    const baseUrl = 'http://localhost:4200';
    
    export const environment = {
      /* other config removed for brevity */
    
      oAuthConfig: {
        issuer: 'https://localhost:44305',
        redirectUri: baseUrl,
        clientId: 'MyProjectName_App',
        responseType: 'code',
        scope: 'offline_access MyProjectName',
      },
     
      /* other config removed for brevity */
    } as Config.Environment;
    
    
  • User Avatar
    0
    ChetanKumbhar created

    hi,

    In our application, We using v3.0.4. In our application there is no parameter like responseType: 'code'. Okay if we upgrade version from v3.0.4 to v3.2 as you mention. and if that paramenter is there then will 2FA work into my application?

    Thanks & Regards, Chetan Kumbhar.

  • User Avatar
    0
    armanozak created

    Hi,

    Changing only responseType won't work. Except for the project name and the issuer address, your oAuthConfig should look exactly like I shared.

    Apart from that, your Angular app should have 2FA support at v3.2, but I don't know about backend. My colleague may help you with that.

  • User Avatar
    0
    ChetanKumbhar created

    Hi, Is that thing worked on your end in v3.2?

    Thanks & Regards, Chetan Kumbhar.

  • User Avatar
    0
    ChetanKumbhar created

    Hi armanozak,

    Any update on this.?

  • User Avatar
    0
    armanozak created

    Hi,

    Have you tried the setting I shared with you?

Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11