简体   繁体   中英

Can't redirect back to my app amplify signInWithWebUI

I'm trying to implement AWS sign in with web UI on my app, followed the documentation and it's working fine but I can't redirect back to my app after sign in.

In my amplifyconfiguration.json:

"Auth": {
                "Default": {
                    "OAuth": {
                        "WebDomain": "xxxxxxxxxxxx",
                        "AppClientId": "xxxxxxxxxxxxx",
                        "SignInRedirectURI": "http://localhost:3000/",
                        "SignOutRedirectURI": "http://localhost:3000/",
                        "responseType": "code",
                        "Scopes": [
                            "phone",
                            "email",
                            "openid",
                            "profile",
                            "aws.cognito.signin.user.admin"
                        ]
                    },
                    "authenticationFlowType": "USER_SRP_AUTH"
                }
            }

When I change "SignInRedirectURI": "http://localhost:3000/" to "SignInRedirectURI": "myapp//" instead of the login page it shows this error:

在此处输入图像描述

Am I missing something?

You have to pull the amplify auth again or make changes in your awsconfiguration.json and amplifyconfiguration.json file to change the redirect URL.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM