使用带有Web/JS的Stitch身份验证提供者,auth流似乎工作正常,直到重定向返回到Stitch服务器。
loginFB() {
const credentialFB = new FacebookRedirectCredential();
this.$stitch.auth.loginWithRedirect(credentialFB);
} 然后从Stitch服务返回此错误:
error: "error exchanging access code with OAuth2 provider"
error_code: "AuthError"
link: "https://stitch.mongodb.com/groups/5ded6422f2a30b6096c347b8/apps/5dfdd120fab085de276dacb2/logs?co_id=5e176295f9d51cd518d60dc6"按照错误消息中的链接,我们到达了Stitch日志,上面写着同样的内容。

我跟踪了官方文档(奇妙,不用担心)来设置它,并测试了以下内容:
在托管(https / http)和localhost.
不幸的是,试图在正式文档中或在Stackoverflow中查找有关此错误的信息没有产生任何结果。有人能帮我解释一下如何避免这个错误吗?
博士:https://docs.mongodb.com/stitch/authentication/facebook/
https://docs.mongodb.com/stitch/tutorials/guides/todo-guide-facebook/
发布于 2020-01-10 15:01:07
显示的错误是由于Stitch中Auth provider部分中的应用程序机密错误造成的。一旦从Facebook应用程序中修正了正确的秘密,登录就会如愿以偿。这个错误应该在缝纫文档中提到,但是在写这篇文章的时候不会被记录下来。
https://stackoverflow.com/questions/59669563
复制相似问题