For my application, I want to allow only the “google-oauth2” option to show in the universal login page

I don’t want to display the email and password field. From my application’s connection settings, I disabled “Username-Password-Authentication” and only enabled “google-oauth2”. Similar to the screenshots an older post . However, my login popup still shows the email and password fields.

basically I have the exact same issue as in this post

my tenant have 2 applications, the “Username-Password-Authentication” option is enabled for 1 of them and not for the other (but currently it shown for both of them)

how can I fix it?

Hey there @idan500 welcome to the community!

Hmm that’s odd :thinking: With only the Google connection enabled for the application, you shouldn’t be seeing the username/pass option. Are you using a particular SDK? Do you get the same result in incognito or a different browser? If you use developer tools or similar to inspect the /authorize request, do you see the correct client_id being passed?

Keep us posted!

Hi @tyf , thanks for the quick response!

  1. I’m using the React SDK
  2. I’m getting the same result in incognito and different browser.
  3. I’m seeing the correct client_id in the /authorize request

the login and authentication are working as expected for both of my applications in this tenant.
actually I just tried to disable the “Username-Password-Authentication” now for the other application and it shown there as well.

I’m talking about this field of course.


also, just for the sake of the checking, I added “windowslive” and it is show as expected.

is this any additional way that is controlling it on the application level?

btw, this is my auth0 provider settings in the react code:

const auth0Provider: Auth0ProviderOptions = {
    domain: AUTH0_CONFIG.domain,
    clientId: AUTH0_CONFIG.clientId,
    authorizationParams: {
        audience: AUTH0_CONFIG.audience,
        redirect_uri: window.location.origin,
        organization: searchParams.get('organization') || undefined,
        invitation: searchParams.get('invitation') || undefined
    },
    useRefreshTokens: false,
    cacheLocation: 'localstorage'
};

No worries, happy to help!

I have nearly the same configuration and only see the Google social login button, as expected. The React SDK does have a connection param that can be passed in authorizationParams. This would bring users directly to Google to login.

Not sure if you have user or are just testing, but it might be worth deleting the database connection and re-creating.

@tyf
ok so I set connection: 'google-oauth2' under the authorizationParams object and now it looks like the universal login is kind of automatically prompt me my available google usernames.
shouldn’t it just show me the following login page?

if I didn’t explained myself correctly then I meant that it skips the login page and just show the UI that after clicking the Continue with Google button.
is it the expected behavior?

any easy way to delete and re-create the database with the exact same existing settings?

That’s expected behavior - Essentially redirecting users directly to Google and skipping any sort of “sign in with Google” prompt. Are you using default New Universal Login settings? I would also check to see if you have any configured rules or actions that could be getting in the way.

we don’t have any rules or actions defined in our tenants.
and yea we are using the default universal login settings (besides some custom texts changes and theme changes)

the universal login settings might affect it somehow? if so, what setting should do it? :thinking: