Skip to content

Commit

Permalink
provide minimum google authentication scope
Browse files Browse the repository at this point in the history
  • Loading branch information
ndnam198 committed Oct 26, 2024
1 parent 99513e9 commit 381e8ef
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/src/components/supa_socials_auth.dart
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,15 @@ class _SupaSocialsAuthState extends State<SupaSocialsAuth> {
required String? webClientId,
required String? iosClientId,
}) async {
final scopes = widget.scopes != null
? widget.scopes![OAuthProvider.google]?.split(',')
: null;

final GoogleSignIn googleSignIn = GoogleSignIn(
clientId: iosClientId,
serverClientId: webClientId,
// These default values ['email', 'profile'] are needed as to gogole authenitcation recent update
scopes: scopes ?? ['email', 'profile'],
);

final googleUser = await googleSignIn.signIn();
Expand Down

0 comments on commit 381e8ef

Please sign in to comment.