简体   繁体   中英

AWS amplify add auth: how to add a redirect signin URI after executing the amplify cli

Context: I was following a AWS tutorial to create iOS application using Amplify. One of the steps was to use 'amplify add auth' and specify the 'redirect signing URI'. For some reason the CLI didn't prompt me for the URL. 'amplify update auth' does not provide an option to specify the redirect URL.

Question: How can I add redirect URL to the project, after executing the 'amplify add auth' command?

I don't know what problem you are having, but you can use

amplify update auth

If you try:

amplify add auth

It will give you an error:

Auth has already been added to this project. To update run amplify update auth.

Use amplify update auth, you will be asked for the URI.

Please note that certain attributes may not be overwritten if you choose to use defaults settings.

You have configured resources that might depend on this Cognito resource.  Updating this Cognito resource could have unintended side effects.

Using service: Cognito, provided by: awscloudformation
 What do you want to do? (Use arrow keys)
 What do you want to do? Apply default configuration with Social Provider (Federation)
 What domain name prefix do you want to use? myprojd2553e50-d2553e50
 Enter your redirect signin URI: myapp://callback/
? Do you want to add another redirect signin URI No
 Enter your redirect signout URI: myapp://signout/
? Do you want to add another redirect signout URI No
 Select the identity providers you want to configure for your user pool: (Press <space> to select, <a> to toggle all, <i> to invert selection)
>( ) Facebook
 ( ) Google
 ( ) Login With Amazon

If you need to start over, try:

amplify init
amplify pull auth
amplify remove auth
amplify add auth

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