flutter_appauth icon indicating copy to clipboard operation
flutter_appauth copied to clipboard

IOS redirect hangs after authenticating

Open bigDado opened this issue 3 years ago • 2 comments

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 avatar Feb 23 '22 07:02 bigDado

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.

bigDado avatar Feb 24 '22 13:02 bigDado

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 avatar Feb 25 '22 09:02 MaikuB

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

MaikuB avatar Oct 08 '22 05:10 MaikuB