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.8k
[google_sign_in] add serverAuthCode to GoogleSignInAccount #4180
Merged
fluttergithubbot
merged 14 commits into
flutter:master
from
p-shapovalov:fix/reuse-server-auth-code
Oct 21, 2021
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
2c6f55e
reuse serverAuthCode obtained on login
p-shapovalov 8291838
tests fix
p-shapovalov 5b011ae
Merge branch 'master' into fix/reuse-server-auth-code
p-shapovalov f17f84e
Merge branch 'master' into fix/reuse-server-auth-code
p-shapovalov b7b9be2
Merge branch 'master' into fix/reuse-server-auth-code
p-shapovalov 258087c
Merge branch 'master' into fix/reuse-server-auth-code
p-shapovalov c97830f
move serverAuthCode to GoogleSignInAccount
p-shapovalov f9097ff
avoid breaking changes
p-shapovalov 6c63d81
pass GoogleSignInAccount.serverAuthCode to GoogleSignInAuthentication
p-shapovalov 58a16b3
restore prev behaviour for deprecated serverAuthCode
p-shapovalov bebb406
restore deprecated test
p-shapovalov 28194da
Trigger Build
p-shapovalov e092b7a
Merge branch 'fix/reuse-server-auth-code' of https://github.com/p-sha…
p-shapovalov 885e1c1
fix deprecated_member_use_from_same_package
p-shapovalov 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ void main() { | |
"id": "8162538176523816253123", | ||
"photoUrl": "https://lh5.googleusercontent.com/photo.jpg", | ||
"displayName": "John Doe", | ||
"serverAuthCode": "789" | ||
}; | ||
|
||
const Map<String, dynamic> kDefaultResponses = <String, dynamic>{ | ||
|
@@ -350,7 +351,8 @@ void main() { | |
|
||
expect(auth.accessToken, '456'); | ||
expect(auth.idToken, '123'); | ||
expect(auth.serverAuthCode, '789'); | ||
// fix deprecated_member_use_from_same_package | ||
// expect(auth.serverAuthCode, '789'); | ||
expect( | ||
log, | ||
<Matcher>[ | ||
|
@@ -382,11 +384,11 @@ void main() { | |
|
||
group('GoogleSignIn with fake backend', () { | ||
const FakeUser kUserData = FakeUser( | ||
id: "8162538176523816253123", | ||
displayName: "John Doe", | ||
email: "[email protected]", | ||
photoUrl: "https://lh5.googleusercontent.com/photo.jpg", | ||
); | ||
id: "8162538176523816253123", | ||
displayName: "John Doe", | ||
email: "[email protected]", | ||
photoUrl: "https://lh5.googleusercontent.com/photo.jpg", | ||
serverAuthCode: '789'); | ||
|
||
late GoogleSignIn googleSignIn; | ||
|
||
|
@@ -411,6 +413,7 @@ void main() { | |
expect(user.email, equals(kUserData.email)); | ||
expect(user.id, equals(kUserData.id)); | ||
expect(user.photoUrl, equals(kUserData.photoUrl)); | ||
expect(user.serverAuthCode, equals(kUserData.serverAuthCode)); | ||
|
||
await googleSignIn.disconnect(); | ||
expect(googleSignIn.currentUser, isNull); | ||
|
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.
Why was commented-out code checked in?
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.
Oops, sorry I should have caught it. I'll create a PR to remove it
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.
#4442