MaikuB / flutter_appauth

A Flutter wrapper for AppAuth iOS and Android SDKs
270 stars 243 forks source link

IOS redirect hangs after authenticating #304

Closed bigDado closed 1 year ago

bigDado commented 2 years ago

Hello, I've seen a few posts mentioning this, adding a trailing slash etc. But I can't seem to get it working

my plist

<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleTypeRole</key>
             <string>Editor</string>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>com.manager.app</string>
        </array>
    </dict>
</array>

my code

final result = await appAuth.authorizeAndExchangeCode(
      AuthorizationTokenRequest(
        clientId,
        redirectUri: "com.manager.app:/oauth_redirect",
        discoveryUrl: sso,
        scopes: scopes,
      ),
    );

I'm connecting to a .net IdentityServer4. Thanks for the help

bigDado commented 2 years ago

First login when we enter email and password hangs in the redirect phase, and when we go back to the login page and click login => it succeeds without asking for any information, simply logs us in and continues normally.

MaikuB commented 2 years ago

The trailing slash mentioned was only applicable for Azure AD and Azure B2C. Don't know why yours would hang when oAuth is generic and this is working with other providers including the demo identity server. You need to drill into the iOS side yourself using Xcode to debug to find out why the redirect isn't occurring

MaikuB commented 1 year ago

Closing due to lack of updates from a while back. If you believe there's an issue then file a new issue and include a link to a repository hosting a minimal app that can reproduce the issue