# Login with google account inside my application

**URL:** <https://community.auth0.com/t/login-with-google-account-inside-my-application/128308>\
**Category:** Get Help\
**Tags:** configuration, application\
**Created:** [February 26, 2024, 10:10am UTC](https://community.auth0.com/t/login-with-google-account-inside-my-application/128308 "2024-02-26T10:10:58Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![andy.nguyendinh](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@andy.nguyendinh](https://community.auth0.com/u/andy.nguyendinh)\
**Post date:** [February 26, 2024, 10:10am UTC](https://community.auth0.com/t/login-with-google-account-inside-my-application/128308/1 "2024-02-26T10:10:58Z")

</div>

I want to login with google in my application (React Native application) without opening default web page from auth0. Please help me

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [February 26, 2024, 12:23pm UTC](https://community.auth0.com/t/login-with-google-account-inside-my-application/128308/3 "2024-02-26T12:23:36Z")

</div>

Welcome to the Auth0 Community @andy.nguyendinh !

Social connections (like Google or Facebook) support only passive (browser-based) authentication flow because most social providers don’t allow a username and password to be entered into applications that they don’t own.

From your React app you can redirect users to the Google’s login page (skipping the Auth0’s hosted login form) by providing the connection parameter value to the [/authorize](https://auth0.com/docs/api/authentication#social) request.

```auto
GET https://{yourDomain}/authorize?
  response_type=code|token&
  client_id={yourClientId}&
  connection=google-oauth2&
  redirect_uri={https: //yourApp/callback}&
  state=STATE&
  ADDITIONAL_PARAMETERS

```

Please let us know any other questions you may have on this topic!

---

<div class="post-metadata">

**Author:** ![andy.nguyendinh](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@andy.nguyendinh](https://community.auth0.com/u/andy.nguyendinh)\
**Post date:** [February 27, 2024, 8:55am UTC](https://community.auth0.com/t/login-with-google-account-inside-my-application/128308/5 "2024-02-27T08:55:47Z")

</div>

![image](https://global.discourse-cdn.com/auth0/original/3X/9/1/910248a2a441927f60b2c2585f0d3f1b4d79607b.jpeg)  
I received this response when i tried your solution

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [February 29, 2024, 3:48pm UTC](https://community.auth0.com/t/login-with-google-account-inside-my-application/128308/6 "2024-02-29T15:48:46Z")

</div>

Hi @andy.nguyendinh , Thank you for following up.

The result is be that a user goes directly to this login page:

 ![image](https://global.discourse-cdn.com/auth0/original/3X/f/4/f4b96203d81f7c6c36f683caee999816874ac33e.png)

instead of landing on the default Auth0’s login page in the first instance:

 ![image](https://global.discourse-cdn.com/auth0/original/3X/9/6/961d92638757322bd128b9394ad792b321aa56ee.png)

> [@andy.nguyendinh](#):
>
> I received this response when i tried your solution

This looks good. In your Network requests list after authenticating, you should also see a request that contains tokens in the response:  
`POST https://subdomain.eu.auth0.com/oauth/token`

 ![image](https://global.discourse-cdn.com/auth0/original/3X/2/c/2c568f3f4f5d0e421d1f72df6f914e4a8a116a62.png)

Please let us know if there are any questions!

---

<div class="post-metadata">

**Author:** ![andy.nguyendinh](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@andy.nguyendinh](https://community.auth0.com/u/andy.nguyendinh)\
**Post date:** [February 29, 2024, 3:57pm UTC](https://community.auth0.com/t/login-with-google-account-inside-my-application/128308/7 "2024-02-29T15:57:42Z")

</div>

can you show me full api url of this api and the payload of it?

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [February 29, 2024, 5:39pm UTC](https://community.auth0.com/t/login-with-google-account-inside-my-application/128308/9 "2024-02-29T17:39:53Z")

</div>

Hi @andy.nguyendinh ,

Additionally, if you intent to receive the Google’s access token, please take a look at this article: [Identity Provider Access Tokens](https://auth0.com/docs/secure/tokens/access-tokens/identity-provider-access-tokens).

---

<div class="post-metadata">

**Author:** ![andy.nguyendinh](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@andy.nguyendinh](https://community.auth0.com/u/andy.nguyendinh)\
**Post date:** [February 29, 2024, 5:48pm UTC](https://community.auth0.com/t/login-with-google-account-inside-my-application/128308/10 "2024-02-29T17:48:01Z")

</div>

Thanks for supporting me. Could you please show me the payload? I need it to compare with mine

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [February 29, 2024, 5:50pm UTC](https://community.auth0.com/t/login-with-google-account-inside-my-application/128308/11 "2024-02-29T17:50:52Z")

</div>

![image](https://global.discourse-cdn.com/auth0/original/3X/6/4/6403c5c3b91dd7e3434aa0badfa485aa1dc17df1.png)

---

<div class="post-metadata">

**Author:** ![andy.nguyendinh](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@andy.nguyendinh](https://community.auth0.com/u/andy.nguyendinh)\
**Post date:** [February 29, 2024, 5:57pm UTC](https://community.auth0.com/t/login-with-google-account-inside-my-application/128308/12 "2024-02-29T17:57:26Z")

</div>

Are you using authorization code as grant\_type?

---

<div class="post-metadata">

**Author:** ![andy.nguyendinh](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@andy.nguyendinh](https://community.auth0.com/u/andy.nguyendinh)\
**Post date:** [February 29, 2024, 5:57pm UTC](https://community.auth0.com/t/login-with-google-account-inside-my-application/128308/13 "2024-02-29T17:57:52Z")

</div>

And how we get the code?

---

<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:** [March 14, 2024, 5:58pm UTC](https://community.auth0.com/t/login-with-google-account-inside-my-application/128308/14 "2024-03-14T17:58:33Z")

</div>

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