Skip to content

Commit 381e8ef

Browse files
committed
provide minimum google authentication scope
1 parent 99513e9 commit 381e8ef

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/src/components/supa_socials_auth.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,15 @@ class _SupaSocialsAuthState extends State<SupaSocialsAuth> {
158158
required String? webClientId,
159159
required String? iosClientId,
160160
}) async {
161+
final scopes = widget.scopes != null
162+
? widget.scopes![OAuthProvider.google]?.split(',')
163+
: null;
164+
161165
final GoogleSignIn googleSignIn = GoogleSignIn(
162166
clientId: iosClientId,
163167
serverClientId: webClientId,
168+
// These default values ['email', 'profile'] are needed as to gogole authenitcation recent update
169+
scopes: scopes ?? ['email', 'profile'],
164170
);
165171

166172
final googleUser = await googleSignIn.signIn();

0 commit comments

Comments
 (0)