Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
pass GoogleSignInAccount.serverAuthCode to GoogleSignInAuthentication
  • Loading branch information
p-shapovalov committed Oct 8, 2021
commit 6c63d8103482aa572671ab6d3d6b1ed0cb8ae271
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export 'widgets.dart';

/// Holds authentication tokens after sign in.
class GoogleSignInAuthentication {
GoogleSignInAuthentication._(this._data);
GoogleSignInAuthentication._(this._data, this.serverAuthCode);

final GoogleSignInTokenData _data;

Expand All @@ -28,9 +28,8 @@ class GoogleSignInAuthentication {
String? get accessToken => _data.accessToken;

/// Server auth code used to access Google Login
@Deprecated(
'Always null. Use the `GoogleSignInAccount.serverAuthCode` property instead')
String? get serverAuthCode => null;
@Deprecated('Use the `GoogleSignInAccount.serverAuthCode` property instead')
final String? serverAuthCode;

@override
String toString() => 'GoogleSignInAuthentication:$_data';
Expand Down Expand Up @@ -104,7 +103,7 @@ class GoogleSignInAccount implements GoogleIdentity {
response.idToken = _idToken;
}

return GoogleSignInAuthentication._(response);
return GoogleSignInAuthentication._(response, serverAuthCode);
}

/// Convenience method returning a `<String, String>` map of HTML Authorization
Expand Down