Login with Google Directly

Hello all,

I am wondering if there is a way to put a button on the homepage of my React App which lets the user login with Google directly. I basically want to eliminate the step of clicking the Log In button and then clicking the Continue with Google button.

I should point out that I am using the auth0-react SDK

You could add the following parameter in your SPA Auth0 SDK configuration:

connection: ‘google-oauth2’

Hi VnceB,

Where would I set that configuration. Is there a prop that gets passed into my loginWithRedirect so I can separate my Log In button from my Log In with Google button?

A bit late but perhaps helpful as the sdk evolves. To login into a social provider direct from app I needed to structure the request as follows:

loginWithRedirect({
  authorizationParams: {
     connection: "<your provider here, e.g. 'google-oauth2', 'apple', 'linkedin', etc>"
  }
});
1 Like

Glad you have figured it out and thanks for sharing with the rest of community!