authClientProvider top-level property
final
Provider for an AuthClient.
Defaults to using Flutter AppAuth under the hood.
Implementation
final authClientProvider = FutureProvider<AuthClient<OAuthToken>>((ref) async {
final clientSecret = await ref.watch(_clientSecretProvider.future);
return AppAuthClient(
appAuth: ref.watch(appAuthProvider),
clientId: await ref.watch(_clientIdProvider.future),
clientSecret: clientSecret.isNotEmpty ? clientSecret : null,
issuer: await ref.watch(_issuerProvider.future),
redirectUrl: await ref.watch(_redirectUrlProvider.future),
postLogoutRedirectUrl:
await ref.watch(_postLogoutRedirectUrlProvider.future),
authorizeUrl: await ref.watch(_authorizeUrlProvider.future),
tokenUrl: await ref.watch(_tokenUrlProvider.future),
logoutUrl: await ref.watch(_logoutUrlProvider.future),
scopes: await ref.watch(_scopesProvider.future),
);
});