MaikuB/flutter_appauth

AuthorizationServiceConfiguration.fromUrl support

Open

#614 geöffnet am 14. Mai 2025

Auf GitHub ansehen
 (3 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Objective-C (284 Forks)github user discovery
enhancementhelp wanted

Repository-Metriken

Stars
 (303 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 5T 7h) (4 gemergte PRs in 30 T)

Beschreibung

I am building a AppAuth service similar to #407 and i would like to have the option to use the fetchFromUrl() with the discovery url to load my service config as part of the service initialization, before atempting to log in with the service.

I saw the Android AppAuth library offers a fetchFromUrl function for the AuthorizationServiceConfiguration so maybe there could be option to add it here as well.

final FlutterAppAuth _appAuth = FlutterAppAuth();
Completer<void> oidcInitCompleter = Completer<void>();
late final String _clientId;
late final String _discoveryUrl;
late final String _redirectUrl;
AuthorizationServiceConfiguration? _serviceConfiguration;

AppAuthService() {
    _discoveryUrl = someDiscoveryURI;
    _clientId = someClientID;
    _redirectUrl = "someURI;
    /*  Wanted Feature:
   _serviceConfiguration = await  _appAuth.fetchFromUrl(_discoveryUrl);
   */
   oidcInitCompleter.future.then((value) => notifyListeners())
}

Contributor Guide