File tree Expand file tree Collapse file tree 1 file changed +16
-10
lines changed
lib/app/modules/auth/data/repositories Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -34,18 +34,24 @@ abstract class WebAuth2OAuthRepository implements OAuthRepository {
3434 'offline_access' ,
3535 ];
3636 final prompt = recentLogout ? 'login' : 'consent' ;
37- final url = '${Strings .idpBaseUrl }/authorize'
38- '?client_id=$clientId '
39- '&redirect_uri=${Strings .idPRedirectUri }'
40- '&scope=${scopes .join ('%20' )}'
41- '&response_type=code'
42- '&state=$state '
43- '&code_challenge=$codeChallenge '
44- '&code_challenge_method=S256'
45- '&prompt=$prompt ' ;
37+ final authorizeUri = Uri (
38+ scheme: Uri .parse (Strings .idpBaseUrl).scheme,
39+ host: Uri .parse (Strings .idpBaseUrl).host,
40+ path: '/authorize' ,
41+ queryParameters: {
42+ 'client_id' : clientId,
43+ 'redirect_uri' : Strings .idPRedirectUri,
44+ 'scope' : scopes.join (' ' ),
45+ 'response_type' : 'code' ,
46+ 'state' : state,
47+ 'code_challenge' : codeChallenge,
48+ 'code_challenge_method' : 'S256' ,
49+ 'prompt' : prompt,
50+ },
51+ );
4652
4753 final result = await FlutterWebAuth2 .authenticate (
48- url: url ,
54+ url: authorizeUri. toString () ,
4955 callbackUrlScheme: Strings .idpRedirectScheme,
5056 );
5157 final uri = Uri .parse (result);
You can’t perform that action at this time.
0 commit comments