如果我们想更新
aws-exports
中的 Amplify 注销重定向 URI,我们该怎么做?
我们可以直接编辑文件并运行吗
amplify push
?
尝试过手动编辑
aws-exports
,但这并不需要。我猜我们必须amplify remove auth
并从头开始......
我认为如果不删除身份验证服务并再次添加它就无法更改它。
问题是您可能不需要这样做,因为您有兴趣更改的部分可能在查询字符串中。
类似:
https://yourdomain-dev.auth.eu-west-2.amazoncognito.com/login?response_type=code&client_id=123413241341234134&redirect_uri=http://localhost:3000/signin/
由于这是我们粘贴到 Facebook 或 Google 等其他地方的 url,因此我们可以简单地更新 url 的最后部分以指向我们更新的位置:
https://yourdomain-dev.auth.eu-west-2.amazoncognito.com/login?response_type=code&client_id=123413241341234134&redirect_uri=http://localhost/updated-endpoint/
只要您仍在使用开发环境,这应该没问题。 Facebook 将重定向到它预先知道的网站,并且您的网站将处理该网址。