问题描述
我正在尝试通过提供的步骤通过不同的提供程序使用FirebaseUI身份验证来设置Angular(v11)应用,请按照提供的步骤.
为了使其正常工作,我必须删除"-default-rtdb"(因此,在这种情况下,正确的回调是:"https://bit-of-gaia.firebaseapp.com/__/auth/handler")
I'm trying to setup Angular (v11) app with FirebaseUI auth via different providers, following steps provided here.
The only one that works for me is Google. Others I'm trying all give various errors:
- Twitter: "Callback URL not approved for this client application. Approved callback URLs can be adjusted in your application settings"
- GitHub: "Unable to process request due to missing initial state. This may happen if browser sessionStorage is inaccessible or accidentally cleared"
- Microsoft: "The provided value for the input parameter 'redirect_uri' is not valid"
However, I followed the steps & configured API keys & callback URL in the respective platforms per Firebase instructions (using the callback Firebase shows when you enable each sign-in method). The only one not so sure I did properly is Microsoft, but the others were pretty straight forward.
This is the published page in case you want to see the behavior.
This is the code repo -- the main files where I implemented the logic are in auth.service.ts & login.component.ts (I hid the apiKey/appId in firebaseConfig, since not sure if it's sensitive).
Anyone had luck with it & perhaps has some tip? Thanks!!
I finally got it to work. It appears the callback URL it suggests you use in Firebase is wrong. See this example from one of the platforms: .
To make it work I had to remove the "-default-rtdb" (so correct callback in this case is: "https://bit-of-gaia.firebaseapp.com/__/auth/handler")
这篇关于通过Twitter,GitHub,Microsoft不起作用的Angular FirebaseUI身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!