File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
lib/auth/data/data_source Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ import 'package:supabase_flutter/supabase_flutter.dart';
55class AuthDataSourceImpl implements AuthDataSource {
66 final SupabaseClient _client;
77
8+ static const _url = 'https://gitflow-exercise.github.io/MongoAI-web' ;
9+
810 AuthDataSourceImpl ({required SupabaseClient client}) : _client = client;
911
1012 @override
@@ -17,8 +19,7 @@ class AuthDataSourceImpl implements AuthDataSource {
1719
1820 @override
1921 Future <void > signInWithGoogle () async {
20- final origin = Uri .base .origin;
21- final redirectUrl = '$origin /auth/callback' ;
22+ final redirectUrl = '$_url /auth/callback' ;
2223 await _client.auth.signInWithOAuth (
2324 OAuthProvider .google,
2425 redirectTo: redirectUrl,
@@ -44,9 +45,7 @@ class AuthDataSourceImpl implements AuthDataSource {
4445 Future <void > deleteUser (String id) async {
4546 final response = await _client.functions.invoke (
4647 'delete-user' ,
47- body: {
48- 'authorization' : session! .accessToken,
49- },
48+ body: {'authorization' : session! .accessToken},
5049 );
5150
5251 print (response);
You can’t perform that action at this time.
0 commit comments