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

Commit 477bd85

Browse files
committed
Add doc for iOS auth with SERVER_CLIENT_ID
1 parent f7138f7 commit 477bd85

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

packages/google_sign_in/google_sign_in/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 5.2.3+1
2+
3+
* Add doc for iOS auth with SERVER_CLIENT_ID
4+
15
## 5.2.3
26

37
* Bumps the Android dependency on `com.google.android.gms:play-services-auth` and therefore removes the need for `jetifier`.

packages/google_sign_in/google_sign_in/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,20 @@ This plugin requires iOS 9.0 or higher.
6161
<!-- End of the Google Sign-in Section -->
6262
```
6363

64+
### iOS Authenticate with backend server
65+
66+
If you use Google Sign-In with an app that communicates with a backend server,
67+
you might need to identify the currently signed-in user on the server.
68+
To check the integrity of the token on your server you need to add an extra
69+
`aud` field in the `idToken`.
70+
71+
To do so you need to add a `SERVER_CLIENT_ID` key value pair in your `GoogleService-Info.plist`:
72+
73+
```xml
74+
<key>SERVER_CLIENT_ID</key>
75+
<string>[YOUR SERVER CLIENT ID]</string>
76+
```
77+
6478
#### iOS additional requirement
6579

6680
Note that according to

packages/google_sign_in/google_sign_in/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Flutter plugin for Google Sign-In, a secure authentication system
33
for signing in with a Google account on Android and iOS.
44
repository: https://github.com/flutter/plugins/tree/main/packages/google_sign_in/google_sign_in
55
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+google_sign_in%22
6-
version: 5.2.3
6+
version: 5.2.3+1
77

88
environment:
99
sdk: ">=2.14.0 <3.0.0"

0 commit comments

Comments
 (0)