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

Commit f5568e4

Browse files
[google_sign_in] Add doc for iOS auth with SERVER_CLIENT_ID (#4747)
* Add doc for iOS auth with SERVER_CLIENT_ID * Follow pub versioning guidelines * Remove incorrect documentation saying that `clientId` is only configurable on web. * Revert "Add doc for iOS auth with SERVER_CLIENT_ID" This reverts commit 477bd85. * Adds documentation for iOS auth with SERVER_CLIENT_ID --------- Co-authored-by: stuartmorgan <[email protected]>
1 parent 90f4473 commit f5568e4

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

packages/google_sign_in/google_sign_in/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
## NEXT
1+
## 5.4.4
22

3+
* Adds documentation for iOS auth with SERVER_CLIENT_ID
34
* Updates minimum Flutter version to 3.0.
45

56
## 5.4.3

packages/google_sign_in/google_sign_in/README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@ This plugin requires iOS 9.0 or higher.
4343
5. Select `GoogleService-Info.plist` from the file manager.
4444
6. A dialog will show up and ask you to select the targets, select the `Runner`
4545
target.
46-
7. Then add the `CFBundleURLTypes` attributes below into the
46+
7. If you need to authenticate to a backend server you can add a
47+
`SERVER_CLIENT_ID` key value pair in your `GoogleService-Info.plist`.
48+
```xml
49+
<key>SERVER_CLIENT_ID</key>
50+
<string>[YOUR SERVER CLIENT ID]</string>
51+
```
52+
8. Then add the `CFBundleURLTypes` attributes below into the
4753
`[my_project]/ios/Runner/Info.plist` file.
4854

4955
```xml
@@ -65,9 +71,9 @@ This plugin requires iOS 9.0 or higher.
6571
<!-- End of the Google Sign-in Section -->
6672
```
6773

68-
As an alternative to adding `GoogleService-Info.plist` to your Xcode project, you can instead
69-
configure your app in Dart code. In this case, skip steps 3-6 and pass `clientId` and
70-
`serverClientId` to the `GoogleSignIn` constructor:
74+
As an alternative to adding `GoogleService-Info.plist` to your Xcode project,
75+
you can instead configure your app in Dart code. In this case, skip steps 3 to 7
76+
and pass `clientId` and `serverClientId` to the `GoogleSignIn` constructor:
7177

7278
```dart
7379
GoogleSignIn _googleSignIn = GoogleSignIn(
@@ -79,7 +85,7 @@ GoogleSignIn _googleSignIn = GoogleSignIn(
7985
);
8086
```
8187

82-
Note that step 7 is still required.
88+
Note that step 8 is still required.
8389

8490
#### iOS additional requirement
8591

packages/google_sign_in/google_sign_in/pubspec.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +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.4.3
7-
6+
version: 5.4.4
87

98
environment:
109
sdk: ">=2.14.0 <3.0.0"

0 commit comments

Comments
 (0)