Flutter Amplify with SAML

Issue

https://docs.amplify.aws/lib/auth/signin_web_ui/q/platform/flutter#ios-platform-setup

Im trying to find out if its possible to use SAML with Flutter Amplify plugin

I only see documentation on how to do this with native iOS and Android

How would this be done with Flutter

is it just as simple as updating to awsconfiguration.json to include your SAML info?

{
    "IdentityManager": {
        ...
    },
    "CredentialsProvider": {
        ...
    },
    "CognitoUserPool": {
        ...
    },
    "Auth": {
        "Default": {
            "OAuth": {
                "WebDomain": "YOUR_AUTH_DOMAIN.auth.us-west-2.amazoncognito.com", // Do not include the https:// prefix
                "AppClientId": "YOUR_APP_CLIENT_ID",
                "SignInRedirectURI": "myapp://",
                "SignOutRedirectURI": "myapp://",
                "Scopes": ["openid", "email"]
            }
        }
    }
}

and then just calling Amplify.Auth.signInWithWebUI(); ?

or am i missing something else that is needed?

or is this not possible with Flutter Amplify yet?

Solution

turns out all i needed was the correct OAuth config values and simply calling signInWithWebUI()

Answered By – Derek Hannah

Answer Checked By – Katrina (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published.