restoreGrant function
AuthorizationCodeGrant
restoreGrant(})
Creates an authorization code grant and advances the internal state to
pendingResponse
so that parameter exchange will work.
Implementation
oauth2.AuthorizationCodeGrant restoreGrant(
Config config, {
required String state,
String? codeVerifier,
http.Client? httpClient,
}) {
final grant = createGrant(
config,
codeVerifier: codeVerifier,
httpClient: httpClient,
);
// Advances the internal state.
grant.getAuthorizationUrl(
config.redirectUri,
scopes: config.scopes,
state: state,
);
return grant;
}