MaikuB / flutter_appauth

A Flutter wrapper for AppAuth iOS and Android SDKs
269 stars 238 forks source link

iOS redirection when user confirm the account in email. #502

Open alfredobs97 opened 1 month ago

alfredobs97 commented 1 month ago

Hi! First of all, thank you for your time contributing in this package!

I'm implementing this plugin plus Keycloak provider for user auth in our app. I followed every step to setup the iOS & Android app, in the android app, the redirection works perfect but for IOS, when the user confirm his/her account in the email, he/she is not being redirected to the app and he/she should login again.

I added this configuration to Info.plist

<array>
    <dict>
    <key>CFBundleTypeRole</key>
    <string>Editor</string>
    <key>CFBundleURLSchemes</key>
        <array>
                <string>com.production.app</string>
            <string>com.test.app</string>
        </array>
    </dict>
</array>

And I created this url for redirection:

authLogInRedirectUrl: 'com.test.app://auth-callback/',
authLogoutRedirectUrl: 'com.test.app://logout-callback/',

That I used in the appAuth.authorizeAndExchangeCode

Also, I configured the Keycloak server with the valid redirect urls with this values.

I'm not sure if I'm missing some step. but for Android works with this configuration, for iOS works every redirection without the redirection from the webview or the safari browser when the user confirm the email.

Thanks for your time again!