Login with Facebook using Cognito is redirecting to URL with an error

橙三吉。 提交于 2019-12-11 16:42:37

问题


I've created a User Poll and connected a Facebook to it. Here is what it looks like in the AWS Console.

I also have set email as a required attribute for signing up.

However, when I visit my hosted login page and click Continue with Facebook, I get redirected back to my page with URL

http://localhost:4200/#error_description=attributes%20required:%20[email]&error=invalid_request

Why is this happening? I've followed all the instructions, and have included email as a scope. I am expecting an access_token in the URL.

Please help. Thanks!


回答1:


The error message says that the email address is required which indicates that email is a required attribute on your user pool. You have done the correct thing by including the "email" scope but you also have to include the attribute mapping for the provider (Facebook in your case) in the Amazon Cognito console by mapping facebook email to Cognito email attribute. Please give this a shot and let us know if it worked or not.



来源:https://stackoverflow.com/questions/48135017/login-with-facebook-using-cognito-is-redirecting-to-url-with-an-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!