processStartup static method
Implementation
static Future<AuthorizationResponse?> processStartup({
required String clientId,
String? clientSecret,
required String redirectUrl,
required Iterable<String> scopes,
required OpenIdConfiguration configuration,
bool autoRefresh = true,
}) async {
if (!kIsWeb)
return null; //TODO: Change this to not bypass if other platforms need these.
final response = await _platform.processStartup();
if (response == null) return null;
final storage = new FlutterSecureStorage();
final codeVerifier = await storage.read(key: CODE_VERIFIER_STORAGE_KEY);
final codeChallenge = await storage.read(key: CODE_CHALLENGE_STORAGE_KEY);
await storage.delete(key: CODE_VERIFIER_STORAGE_KEY);
await storage.delete(key: CODE_CHALLENGE_STORAGE_KEY);
final result = await _completeCodeExchange(
request: InteractiveAuthorizationRequest._(
clientId: clientId,
clientSecret: clientSecret,
redirectUrl: redirectUrl,
scopes: scopes,
configuration: configuration,
autoRefresh: autoRefresh,
codeVerifier: codeVerifier!,
codeChallenge: codeChallenge!,
),
url: response,
);
return result;
}