MaikuB / flutter_appauth

A Flutter wrapper for AppAuth iOS and Android SDKs
274 stars 246 forks source link

Browser doesn't ask for credentials the 2nd time #562

Closed 808thlife closed 1 week ago

808thlife commented 3 weeks ago

After logging in as X user, the built-in browser just doesn't ask for anymore credentials and just logging user in using previous used credentials.

The code for login in function

final AuthorizationTokenResponse result =
          await appAuth.authorizeAndExchangeCode(
        AuthorizationTokenRequest(
          Constants.oauth2ClientId,
          'com.application.app:/oauthredirect',
          serviceConfiguration: AuthorizationServiceConfiguration(
            authorizationEndpoint: API.oauth2authorize().toString(),
            tokenEndpoint: API.oauth2token().toString(),
          ),
          preferEphemeralSession: true,
          scopes: [
            'read',
            'write',
          ],
          allowInsecureConnections: true,
        ),
      );