# OAuth and 3rd Party Login/User

**URL:** <https://community.parseplatform.org/t/oauth-and-3rd-party-login-user/1391>\
**Category:** Flutter SDK\
**Tags:** 3rd-party-auth, oauth, authentication\
**Created:** [March 1, 2021, 7:46pm UTC](https://community.parseplatform.org/t/oauth-and-3rd-party-login-user/1391 "2021-03-01T19:46:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jjunin](https://community.parseplatform.org/user_avatar/community.parseplatform.org/jjunin/32/486_2.png) [@jjunin](https://community.parseplatform.org/u/jjunin)\
**Post date:** [March 1, 2021, 7:46pm UTC](https://community.parseplatform.org/t/oauth-and-3rd-party-login-user/1391/1 "2021-03-01T19:46:53Z")

</div>

Hello,

I’m trying to sign in via Google. I saw it in the SDK documentation and implemented it in Flutter.

PS. I have already looked at the [How to setup OAuth2 Google in Parse](https://community.parseplatform.org/t/how-to-setup-google-oauth2-login/969) but without success, because I can redeem the parameters through the GoogleSignIn package.

```auto
class OAuthLogin {
  final GoogleSignIn _googleSignIn = GoogleSignIn( scopes: ['email', 'https://www.googleapis.com/auth/contacts.readonly'] );
  
  signInGoogle() async {
    GoogleSignInAccount account = await _googleSignIn.signIn();
    GoogleSignInAuthentication authentication = await account.authentication;
    await ParseUser.loginWith(
        'google',
        google(_googleSignIn.currentUser.id, 
               authentication.accessToken, 
               authentication.idToken));
  }
}

```

Authentication with Google works perfectly I get the User ID on Google, the Access Token and the idToken perfectly, however when trying to log in to Parse the following error appears:

 ![erro google login](https://parse-community-forum-uploads.s3.dualstack.us-east-1.amazonaws.com/original/1X/521656b8b72837ff35254af836e6eebed61d4035.png)

Do I need any further configuration with the Parse SDK Flutter?

---

<div class="post-metadata">

**Author:** ![jjunin](https://community.parseplatform.org/user_avatar/community.parseplatform.org/jjunin/32/486_2.png) [@jjunin](https://community.parseplatform.org/u/jjunin)\
**Post date:** [March 1, 2021, 8:14pm UTC](https://community.parseplatform.org/t/oauth-and-3rd-party-login-user/1391/2 "2021-03-01T20:14:07Z")

</div>

To improve the explanation: When executing a CURL generated by the SDK Flutter, the following error will be returned.

```
{
    "code": 101,
    "error": "invalid signature"
}
```

---

<div class="post-metadata">

**Author:** ![davimacedo](https://community.parseplatform.org/user_avatar/community.parseplatform.org/davimacedo/32/316_2.png) [@davimacedo](https://community.parseplatform.org/u/davimacedo)\
**Post date:** [March 1, 2021, 9:31pm UTC](https://community.parseplatform.org/t/oauth-and-3rd-party-login-user/1391/3 "2021-03-01T21:31:23Z")

</div>

What is the version of Parse Server that you are running? Could you share the configuration that you have in place for your parse server?

---

<div class="post-metadata">

**Author:** ![jjunin](https://community.parseplatform.org/user_avatar/community.parseplatform.org/jjunin/32/486_2.png) [@jjunin](https://community.parseplatform.org/u/jjunin)\
**Post date:** [March 1, 2021, 10:45pm UTC](https://community.parseplatform.org/t/oauth-and-3rd-party-login-user/1391/4 "2021-03-01T22:45:26Z")

</div>

The version of Parse Server is 4.5.0, I will prepare the release of the ports to share access to the settings

---

<div class="post-metadata">

**Author:** ![RodrigoSMarques](https://community.parseplatform.org/user_avatar/community.parseplatform.org/rodrigosmarques/32/35_2.png) [@RodrigoSMarques](https://community.parseplatform.org/u/RodrigoSMarques)\
**Post date:** [March 1, 2021, 10:52pm UTC](https://community.parseplatform.org/t/oauth-and-3rd-party-login-user/1391/5 "2021-03-01T22:52:10Z")

</div>

@jjunin

am using authentication with a Flutter application with parse server 4.5.0.

After several searches, I solved the problem by adding “default\_web\_client\_id” in strings.xml for Android.

This identifier I created at [https://console.cloud.google.com/](https://console.cloud.google.com/) creating an OAuth 2.0 client IDs for Android.

```auto
{
  "google": {
    "id": "1166077090183XXXXXXXX",
    "id_token": "eyJhbGciOiJSUzI1N.......",
    "access_token": "ya29..........."
  }
}

```

For login to work, it is necessary to inform the fields:

- id\_token
- access\_token

---

<div class="post-metadata">

**Author:** ![jjunin](https://community.parseplatform.org/user_avatar/community.parseplatform.org/jjunin/32/486_2.png) [@jjunin](https://community.parseplatform.org/u/jjunin)\
**Post date:** [March 2, 2021, 12:39am UTC](https://community.parseplatform.org/t/oauth-and-3rd-party-login-user/1391/6 "2021-03-02T00:39:13Z")

</div>

I was able to successfully authenticate!

Including “string.xml” in Android settings.

Thanks @RodrigoSMarques
