Pat*_* M. 5 whitelist firebase firebase-authentication angular
In my onboarding work-flow, I'm trying to verify a newly created user's email with this code (as per example in the docs)
verifyEmail(): firebase.Promise<any> {
const actionCodeSettings: firebase.auth.ActionCodeSettings = {
url: 'http://localhost:4200/main/profile',
handleCodeInApp: false
};
return this.afAuth.auth.currentUser.sendEmailVerification(actionCodeSettings);
}
Run Code Online (Sandbox Code Playgroud)
Unfortunately, the result of the promise is this error:
{code: "auth/unauthorized-continue-uri", message: "Domain not whitelisted by project"}
Run Code Online (Sandbox Code Playgroud)
However, in Firebase console, 'localhost' is whitelisted (by default). If I change localhost by my current IP, which is also whitelisted, it doesn't work either.
Here is the request from Chrome Dev tools:
Request URL:https://www.googleapis.com/identitytoolkit/v3/relyingparty/getOobConfirmationCode?key=blahblahblah
Request Method: POST
Status Code: 400
Request Payload:
{
"requestType":"VERIFY_EMAIL",
"idToken":"blahblahblahblah",
"continueUrl":"https://localhost:4200/main/profile",
"canHandleCodeInApp":false
}
Run Code Online (Sandbox Code Playgroud)
And this is my Firebase console:

Looks like a bug but wanted to be sure before raising an issue to Firebase guys.
Any thoughts?
| 归档时间: |
|
| 查看次数: |
4765 次 |
| 最近记录: |