Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 07854d3

Browse files
committed
Google Access Token
1 parent 6171282 commit 07854d3

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

docs/AUTHENTICATION.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,18 @@ Then add the following lines to your code and check for setup instructions for y
533533
);
534534
```
535535

536+
#### Google Access Token (Android only, iOS Coming soon)
537+
Upon successful authentication, Google creates an access token that can be obtained from the login method's result object. This access token can then be used for Google API:
538+
539+
```js
540+
"providers": [
541+
{
542+
"id": "google.com",
543+
"token": "<Google Access Token>"
544+
}
545+
]
546+
```
547+
536548
#### iOS
537549
If you didn't choose this feature during installation you can open the `Podfile` in the plugin's `platforms/ios` folder and uncomment the `GoogleSignIn` line.
538550

src/firebase.android.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,8 @@ function toLoginResult(user, additionalUserInfo?): User {
996996
const pid = providerData.get(i).getProviderId();
997997
if (pid === 'facebook.com') {
998998
providers.push({id: pid, token: firebase._facebookAccessToken});
999+
} else if (pid === 'google.com') {
1000+
providers.push({id: pid, token: firebase._googleSignInIdToken});
9991001
}
10001002
else {
10011003
providers.push({id: pid});

0 commit comments

Comments
 (0)