5
votes

I am using firebase for user authentication in my website. Trying to build a password reset flow where the user receives password reset email, reset's their password and then it is just redirect to the website with the given url.

Problem: I am able to send the password reset email and change the password for that account but when I click the continue button provided by the firebase.It throws following error in browser console.

Uncaught DOMException: Failed to execute 'assign' on 'Location': 
'https://?link=http://mywebsite.com/?email%[email protected]' is not a valid URL.

I am also getting the same error for email verification link also.

The url is whitelisted in Firebase's authorized domains.

Please help me!

1
I found the solution to my question itself. As @bojeil told i was trying to figure out how to configure the FDL domain as there was no proper documentation regarding it in firebase documentation. As a trail and error process, I created a dummy ios project for my website inorder to activate/configure the dynamic links. And then it worked like charm. The page is getting redirected after password reset.bjkpriyanka
Just to clarify, even if this is a web only app you still need to configure Dynamic Links for iOS or Android. This was working for me and just stopped on 5/15/18 and configuring dynamic links for iOS got it working again. Here's the error I was getting {code: 'auth/dynamic-link-not-activated', message: 'fdl domain is empty'}ralphinator80
Mine was also working until 5/15/18 and suddenly stopped as well.Rob

1 Answers

6
votes

Are you passing canHandleCodeInApp as true? This means you want the reset link to open in a mobile app if installed. If so, it looks like your FDL domain is not configured (it is resolving to empty string). You should go to the Dynamic links section in the Firebase Console and setup/agree to terms of service. This will update the link to something like: https://example.app.goo.gl/?link=.... You will be able to see that domain in the Console Dynamic links section.

Otherwise you can pass canHandleCodeInApp as false which would open the link via the web action callback URL set up in the email templates section of the Firebase Console. This link will not go through FDL unlike the latter.