Open Closed

Login using AzureAD and OpenIddict #4321


User avatar
0
thanhvl1 created
  • ABP Framework version: v7.0.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes

I've got the following error when I signin to the application through AzureAD

The step is when I click button Microsoft (it is configured in the AuthServer with TenantID and clientId, clientSecret), it redirect to the Register page

But when I click register button, It show error HTTP 400 and I checked the ELK log, I saw the error like the first picture.

Please help me to resolve this problem. Contact me if you need the AzureAD settings for checking


7 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    It seems you are using refresh_token to request the token endpoint of AuthServer

    How can we reproduce the problem?

  • User Avatar
    0
    thanhvl1 created

    hi

    It seems you are using refresh_token to request the token endpoint of AuthServer

    How can we reproduce the problem?

    Hi,

    I've just download the microservice template, add some config as the following

    And then config redirect Urls in the Azure Active Directory

    Then I run Angular frontend and try to login using Microsoft. Nothing changed in the config of angular

    Regards, Thanh

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share the project?

    liming.ma@volosoft.com

  • User Avatar
    0
    thanhvl1 created

    hi

    Can you share the project?

    liming.ma@volosoft.com

    I've figured out some information about this problem.

    The first time when I try to click button Microsoft, it redirects to the page Register and then I click to the button Register, the Error 400 appeared. But when I click go back link, and click Register button again, it comes success and at that time I can logged into the application using SSO

    This is the log when error 400

    This is the log when success after clicking go back link

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please use the template project to reproduce the problem and share it, thanks

  • User Avatar
    0
    thanhvl1 created

    hi

    Please use the template project to reproduce the problem and share it, thanks

    When I run with my project in local, it was successfully authenticated by using azureAD. The issue appeared when I deploy to AKS, noted that only authenticated by using AzureAD make it error.

    I found detail error is The antiforgery cookie token and request token do not match. although I tried to disable auto valivate antiforgery in the authserver module.

    How can I temporarily disable the antiforgery in authserver?

    Thanks

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    I found detail error is The antiforgery cookie token and request token do not match.

    hi

    Please share the full logs, thanks

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