This repository was archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[google_sign_in] Add ability to return serverAuthCode #2116
Merged
Merged
Changes from 35 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
36f7fd0
Update GoogleSignInPlugin.java
yamarkz 9350ff9
Update GoogleSignInPlugin.m
yamarkz 722959c
Update google_sign_in.dart
yamarkz 55ce6a4
Update version number
yamarkz 9efd8c4
Update AUTHORS
yamarkz 73f6fa0
Update CHANGELOG.md
yamarkz df155e5
Update GoogleSignInPlugin.java
yamarkz 66f969c
Update GoogleSignInPlugin.m
yamarkz 3ed41e7
Update google_sign_in.dart
yamarkz 97cbf5b
Update AUTHORS
yamarkz a24a547
Update CHANGELOG.md
yamarkz dba9fde
modify conflict
yamarkz beed787
modify variable assignment
yamarkz 9eb338c
fix conflict
yamarkz 5227ce8
add test case
yamarkz 0cc73de
pubspec version up
yamarkz d77b480
Update CHANGELOG.md
yamarkz 29d0503
fix conflict
yamarkz e4886ad
modify conflict
yamarkz 3ce141f
Merge branch 'master' into server-auth-code
yamarkz 5eaa11a
fix changelog conflict
yamarkz 580b5a6
Merge branch 'master' into server-auth-code
yamarkz cbe903e
modify return values
yamarkz 95a2969
modify conflict
yamarkz 428a12f
modify conflict
yamarkz 10d90fc
modify conflict
yamarkz 7177136
update ios/android example code
yamarkz a1b3655
modify conflict
yamarkz 7c7d0a7
update interface package version
yamarkz 866e356
remove interface code
yamarkz 1381e78
add attribute description comment
yamarkz 39ce20b
remove extra line
yamarkz 1c3b37b
remove unnecessary code
yamarkz 42b6410
modify attribute
yamarkz bfc4d8e
update package version
yamarkz f0cc548
modify CHANGELOG.md
yamarkz 6deb8cf
add EOF line
yamarkz 4cf79ac
modify conflict
yamarkz a373bf7
use v2 embedding context
yamarkz e48ff2c
modify conflict file
yamarkz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -334,7 +334,8 @@ public void init( | |
| .getResources() | ||
| .getIdentifier("default_web_client_id", "string", context.getPackageName()); | ||
| if (clientIdIdentifier != 0) { | ||
| optionsBuilder.requestIdToken(context.getString(clientIdIdentifier)); | ||
| optionsBuilder.requestIdToken(registrar.context().getString(clientIdIdentifier)); | ||
| optionsBuilder.requestServerAuthCode(registrar.context().getString(clientIdIdentifier)); | ||
|
||
| } | ||
| for (String scope : requestedScopes) { | ||
| optionsBuilder.requestScopes(new Scope(scope)); | ||
|
|
@@ -484,6 +485,7 @@ private void onSignInAccount(GoogleSignInAccount account) { | |
| response.put("email", account.getEmail()); | ||
| response.put("id", account.getId()); | ||
| response.put("idToken", account.getIdToken()); | ||
| response.put("serverAuthCode", account.getServerAuthCode()); | ||
| response.put("displayName", account.getDisplayName()); | ||
| if (account.getPhotoUrl() != null) { | ||
| response.put("photoUrl", account.getPhotoUrl().toString()); | ||
|
|
||
4 changes: 4 additions & 0 deletions
4
packages/google_sign_in/google_sign_in/example/android/app/src/main/res/values/strings.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <resources> | ||
| <string name="default_web_client_id">YOUR_WEB_CLIENT_ID</string> | ||
| </resources> | ||
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nits: