Open Closed

Bug: Google SSO login redirects to register page if email address already exists. #2951


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

When trying to login into an account with Google SSO, when there's an existing email address in the system, it doesn't log in and instead is redirected to the register page.

This is related to this issue: https://support.abp.io/QA/Questions/2852/SSO-requires-the-user-to-register-using-the-login-page

I have opened this ticket on behalf of my developer who still cannot add tickets to this system. More screenshots will follow.


12 Answer(s)
  • User Avatar
    0
    luke created

    In this screenshot you can see that it's using the AbpClaimTypes.Email which is "email", the claim is not found. Login.cshtml.cs OnGetExternalLoginCallbackAsync()

    Then on the register page the email address is prefilled using the standard ClaimTypes.Email object Register.cshtml.cs TrySetEmailAsync()

  • User Avatar
    0
    luke created

    After fixing the first issue. I'm now finding it again in the method which is supposed to create a user if there is not one.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Did you use the AddGoogle?

  • User Avatar
    0
    luke created

    I'm using the current out-of-the box implementation, template generated in abp suite 5.2.1. Is there any documentation on how this needs to be changed to make it work?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    You can change GoogleOptions on this delegate method.

  • User Avatar
    0
    luke created

    My point is, that I've generated the project, your login method doesn't work with the default configuration, and there is no documentation on settings this up, what am I missing?

  • User Avatar
    0
    luke created

    Also worth noting that I can't sign into this app using Google, same behaviour as I have locally

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    You can create a project, and then share your Google client id and secret and other info, I can try it locally.

    liming.ma@volosoft.com

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Solution

  • User Avatar
    0
    luke created

    That did the trick. Thanks!

    Would work nicely on the ABP support login page too.

  • User Avatar
    0
    dmeagor created

    Seems to be working. Can the Google sign on URL be obtained in anyway so that we can pass it to our front end (static cdn deployed) via an api call? It would be nice to have the button on the homepage.

    We could do some hacky iframe thing but I thought there might be a better way.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Can the Google sign on URL be obtained in anyway

    Can't understand it very well, Can you explain it in detail?

Made with ❤️ on ABP v9.1.0-preview. Updated on December 12, 2024, 07:15