# How does Auth0 authenticate my gmail user?

**URL:** <https://community.auth0.com/t/how-does-auth0-authenticate-my-gmail-user/107147>\
**Category:** Get Help\
**Tags:** email-verification, user-management\
**Created:** [May 17, 2023, 1:43pm UTC](https://community.auth0.com/t/how-does-auth0-authenticate-my-gmail-user/107147 "2023-05-17T13:43:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rao.madhusr](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rao.madhusr/32/47292_2.png) [@rao.madhusr](https://community.auth0.com/u/rao.madhusr)\
**Post date:** [May 17, 2023, 1:43pm UTC](https://community.auth0.com/t/how-does-auth0-authenticate-my-gmail-user/107147/1 "2023-05-17T13:43:28Z")

</div>

Hello, I am just exploring Auth0 from a learning perspective. When I log in to Auth0 ([https://auth0.com/](https://auth0.com/)) using my Gmail credentials how does the authentication happen?

Does Auth0 store all the Gmail user data? Or is there any API exposed by Gmail for this purpose?

Also, the different options on the login page, how can I configure them? Say if I want to add my own custom domain then how can I do it?

Thanks  
Madhu

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [May 18, 2023, 10:36pm UTC](https://community.auth0.com/t/how-does-auth0-authenticate-my-gmail-user/107147/3 "2023-05-18T22:36:46Z")

</div>

Hey @rao.madhusr welcome to the community!

> [@rao.madhusr](#):
>
> When I log in to Auth0 ([https://auth0.com/](https://auth0.com/)) using my Gmail credentials how does the authentication happen?

1. The user clicks on the “Log in with X” button (or another social identity provider).
2. The user’s browser is redirected to the Google, Facebook, etc. login page.
3. The user logs in with their social provider credentials. This step happens entirely on the providers servers – your application never sees the user’s username or password.
4. After the user successfully logs in, the provider sends the user back to your application. As part of this process, the provider includes a piece of information that your application can use to verify that the user is who they claim to be.
5. Auth0 verifies this assertion, creates or updates a user in your Auth0 user database, and then sends an ID Token back to your application. This ID Token contains information (“claims”) about the user, such as their username, email address, and so on.

At this point, the user is authenticated – that is, your application knows who the user is.

> [@rao.madhusr](#):
>
> Does Auth0 store all the Gmail user data? Or is there any API exposed by Gmail for this purpose?

Yes, Auth0 will create and store a [normalized profile](https://auth0.com/docs/manage-users/user-accounts/user-profiles/normalized-user-profile-schema) for the user - Their profile will look something like this:

```auto
{
  "created_at": "2023-03-30T00:44:20.072Z",
  "email": "bart.simpson@gmail.com",
  "email_verified": true,
  "family_name": "Simpson",
  "given_name": "Bart",
  "identities": [
    {
      "provider": "google-oauth2",
      "access_token": "XXX",
      "expires_in": 3599,
      "user_id": "1033643454529712852",
      "connection": "google-oauth2",
      "isSocial": true
    }
  ],
  "locale": "en",
  "name": "Bart Simpson",
  "nickname": "B$",
  "picture": "https://lh3.googleusercontent.com/a/AGNmyxboaf0rlTsdfsfeNL8_cSp17Ekdp-IRyF-P3g=s96-c",
  "updated_at": "2023-03-30T00:44:36.100Z",
  "user_id": "google-oauth2|1033692342346512852",
  "multifactor": [
    "guardian"
  ],
  "multifactor_last_modified": "2023-03-30T00:44:36.100Z",
  "last_ip": "XXX,
  "last_login": "2023-03-30T00:44:20.070Z",
  "logins_count": 1
}

```

> [@rao.madhusr](#):
>
> Also, the different options on the login page, how can I configure them? Say if I want to add my own custom domain then how can I do it?

Some more on custom domains here:  
[https://community.auth0.com/t/custom-domain-configuration-common-questions/82033](https://community.auth0.com/t/custom-domain-configuration-common-questions/82033)

---

<div class="post-metadata">

**Author:** ![rao.madhusr](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rao.madhusr/32/47292_2.png) [@rao.madhusr](https://community.auth0.com/u/rao.madhusr)\
**Post date:** [May 22, 2023, 6:29am UTC](https://community.auth0.com/t/how-does-auth0-authenticate-my-gmail-user/107147/4 "2023-05-22T06:29:19Z")

</div>

Thanks tyf for the detailed explanation. I am trying to integrate OAuth into my personal project and the details you provided really help.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [June 5, 2023, 6:30am UTC](https://community.auth0.com/t/how-does-auth0-authenticate-my-gmail-user/107147/5 "2023-06-05T06:30:13Z")

</div>

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