How to add google sign in embedded login?

Hello,
I’m using my own ui to do sign-up & sign-in,
so i currently use embedded login, but i have no idea how to integrate correctly with google-signin

I dont want to use universal login or lock, since my client don’t want to redirect the page & have their own design

but then how do i register/sync account from google-oauth to auth0 ?
so my auth0 rules will be trigger and roles-creation will be applied,

im using Login using a social provider’s access token api: /oauth/access_token

    {
    'client_id': from auth0-application
    'access_token': from google-signin
    'connection': 'google-oauth2',
    'scope': 'openid profile email'
    }

but the return is 404, Not Found


I Assume the step are:

  • do google signin to get access-token of identity
  • call /oauth/access_token and pass access token of identity and receive access token of database
  • then when i want to get (for eg) userProfile, i use Bearer access token from above

now my concern also how to async the email from database with google sign-in
if I do google-signin with X@mail.com, I also still able to signup with X@mail.com , and in users i got 2 users with the same email

Hi @dellwatson,

The /oauth/access_token is a legacy endpoint that is disabled for tenants created after June 2017. You can read more about legacy grant types here: https://auth0.com/docs/applications/application-grant-types

If you don’t want to use the redirection approach, you can use embedded login. You can use either the Lock.js or Auth0.js SDKs on your web applications to implement embedded login.

Note: As mentioned in the docs, there are security concerns with the embedded login approach, especially without using Custom Domains.

Both lock and auth0.js are able to use social login.

Here is an ready-to-go example using auth0.js: https://auth0.com/docs/libraries/auth0js#ready-to-go-example

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.