Implementation
Uri generateSignInUri(
{required String authorizationEndpoint,
required clientId,
required String redirectUri,
required String codeChallenge,
required String state,
List<String>? scopes,
List<String>? resources,
String prompt = _prompt}) {
var signInUri = Uri.parse(authorizationEndpoint);
Map<String, dynamic> queryParameters = {
'client_id': clientId,
'redirect_uri': redirectUri,
'code_challenge': codeChallenge,
'code_challenge_method': _codeChallengeMethod,
'state': state,
'scope': withReservedScopes(scopes ?? []).join(' '),
'response_type': _responseType,
'prompt': prompt,
};
if (resources != null && resources.isNotEmpty) {
queryParameters.addAll({'resource': resources});
}
return addQueryParameters(signInUri, queryParameters);
}