Base solution for your next web application
Open Closed

Google Signin for Users not working. #10281


User avatar
0
turbofrank created

Prerequisites Product Version: 9.0.1 Angular .NET Core ABP: 5.10.1

I'm looking to add Google Social loging for my app:

The google login button is showing correctly:

But I can not login with this since I have to whitelist the URL:

But, in google, you can not whitelist a domain with wildcards, i.e.:

So how do I do to permit google sign in to users inside a tenant? Of course that whitelisting each tenancy in my google OAuth API is not a viable option.


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @turbofrank

    Yes, Google doesn't support using wildcards in whitelist domain. You can try to include the tenantId into the Google's return url if possible and resolve the tenant when user is returned back.

    Another option would be using the main URL on Google. When user visits yoru website (tenant1.mywebsite.com), a cookie is set for TenantId. Then, if user visits mywebsite.com, the same cookie will be still valid. So, you can redirect user to tenant1.mywebsite.com in the Google Login callback if the cookie contains tenantId. In that case, all should work fine.