Starts in:
2 DAYS
0 HR
6 MIN
1 SEC
Starts in:
2 D
0 H
6 M
1 S
Open Closed

Two factor authentication not working with 3.2.1 #761


User avatar
0
ashutosh.tanksale created

Hi, I am trying to configure the Two factor authentication with v3.2.1. I did all the configuratios and chcked all the required checkboxes from Identity settings and for individual users settings as well. This will updating related fields from DataBase as well i.e. True for two factor authentication. I implemented Twilio and i am getting OTP for phone number verification and the flag is updating in db as well but this also not showing me two factor setting screen while logging. But I am not getting an email in inbox which is attached with user when i click on "Verify email" apllication saying verification mail sent to the specified email address but not getting any email. I have the default setting in Appsetting.json for smtp. Also I gone throught the link which is similar to my issue "https://support.abp.io/QA/Questions/701/Regarding-2-factor-authentication-implementation" bu this also not helped me out. As per document either phone number or email verified then while logging in i should see the two factor authentication screen, but i can not see that. Can you please help out in following two main problems

  1. Email verification link is not getting in inbox.
  2. Even phone number is verified i can not see two factor authentication screen.
  • ABP Framework version: v3.2.1
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Seperated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:

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

    Email verification link is not getting in inbox.

    Have you checked this document: https://docs.abp.io/en/abp/3.2/Emailing ?

  • User Avatar
    0
    ashutosh.tanksale created

    Does this required any code changes in my application except setting change i.e. SMTP and other values.

  • User Avatar
    0
    ashutosh.tanksale created

    Hi @yekalkan,

    I tried with approach of adding values in appsetting.js and even encrypted password as well. I impleted ISettingEncryptionService and using encrypt method get the encrypted value of password and used in appsetting.js. Even all these changes my mail is not getting in inbox. following are my appsetting.js values Following is my implementation of IsettingEncryptionService After this also emails are not getting in inbox. Following is the entry in log file for this Please let me know what i am missing here for Email verification link. Above everything is about email verification. Below is SMS verification But i got successfully implemented sms verification using Twillio and am getting OTPs as well and my number is getting verified. After all these while logging i can not see two factor authentiocation screen which asks for sms otp. What i am missing here as well???

    Please put some more light on this as sson as possible

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi ashutosh.tanksale

    I think you don't need to implement WordSettingDefinitionProvider. The Emailing module has defined these settings, you only need to configure it. https://docs.abp.io/en/abp/latest/Emailing#email-settings

    the smtp server requires a secure connection

    You can also try MailKit, Test your mail settings in the console using MailKit or SmtpEmail.

    https://docs.abp.io/en/abp/latest/MailKit

    Later you can try to rewrite some of the built-in services.

    https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Smtp/SmtpEmailSender.cs https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.MailKit/Volo/Abp/MailKit/MailKitSmtpEmailSender.cs

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    But i got successfully implemented sms verification using Twillio and am getting OTPs as well and my number is getting verified. After all these while logging i can not see two factor authentiocation screen which asks for sms otp. What i am missing here as well???

    Can you share your detailed steps to enable SMS two factor authentication?

  • User Avatar
    0
    ashutosh.tanksale created

    Hi mailming Following are my sms verification steps

    1. I get OTP from Twillio and it verify my mobile number

    2. I downloaded volo.Abp.sms.Twilio package and implemented ISmsSender interface.

    3. Checked all TwoFactor check boxes from profile management and Identity settings

    4. Selected 'Optional' as behaviour

    5. Logged out and while logging expecting a Two factor authentication screen which ask me for sms otp for login but that does not happen.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi @ashutosh.tanksale

    Can I check this remotely? liming.ma@volosoft.com

    I tested the latest project and did not reproduce your problem.

  • User Avatar
    0
    ashutosh.tanksale created

    @maliming Thanks for reply. How can we connect? via Teams call or Skype call? Let me know your convinient timing so i can arrange a teams call

    Regards Ashutosh

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Please send an email to me, I will share a zoom link.

  • User Avatar
    0
    ashutosh.tanksale created

    @limingma Thanks for your troubleshooting. As per our discussion i will create new project in latest version and let you know the update

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    ok Wait for good news.

  • User Avatar
    0
    ashutosh.tanksale created

    @maliming I created new solution in latest version v4.1.1 and still i can not send mail. The smtp setting I am using are correct and we are using them in another project and from there mails are deliverying properly. Can we have a quick zoom call and you can have a look at it quickly?

  • User Avatar
    0
    ashutosh.tanksale created

    @maliming

    Its workgin now in v4.1.1, thanks for your help. I tried same in v3.2.1, here mails are getting in inbox and i can verify them but i can not see authentication screen. Any specific prblem with v3.2.1?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Try add this configuration to your appsettiings.json file:

      "StringEncryption": {
        "DefaultPassPhrase": "uTjg****************"
      },
    

    Related: https://github.com/abpframework/abp/pull/5800

  • User Avatar
    0
    ashutosh.tanksale created

    @maliming, I already tried that

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi ashutosh.tanksale

    And those code.

    https://github.com/abpframework/abp/pull/5800/files#diff-bd1e80b2bf3812c348f82491ccc7e67ee4d33bde04bb75fa81c3ec07b29f0c6dR11-R43

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