2

I've been looking at replacing all the links in the firebase password reset and welcome emails with something more custom, so it doesn't look terrible for users (so moving from https://some-app-123f.firebaseapp.com to link.some-app.com).

I thought that the best way to do this might be to use the firebase dynamic links, so I set up link.some-app.com in there. All good so far.

I generated a new dynamic link directly in the web interface. This is basically going to be used for everyone, or that is my hope. Let's call that link link.some-app.com/email-link. I have then set this up to point to https://some-app-123f.firebaseapp.com/__/auth/action. Going to the first takes me to the second, all good so far. The links just open the web, not apps, and no interstitial page.

I can replace the "Action URL" in the email template with link.some-app.com/email-link. When I email a password reset, I get a link that looks like this: https://link.some-app.com/email-link?mode=resetPassword&oobCode=[hash]&apiKey=[key]&lang=en

However, when I click on this link in debug mode (adding d=1 to the end), I get a bunch of errors:

The format of parameter (mode) is not whitelisted for this domain.

So I thought that I could solve this by using the whitelisting feature on the link domain in the firebase console, so I've tried a bunch of different options, but these are the two most permissive (to cover both domain bases, though I am pretty sure I need to be whitelisting the target domain i.e. firebase)

^https://some-app-123f.firebaseapp.com.*$
^https://link.some-app.com/email-link.*$

Am I completely missing something? Is this something that just isn't possible because it is redirecting back to firebase?

tl;dr: I'm trying to create an effectively serverless redirect link to the password reset functionality in firebase using a prettier url than firebase gives you out of the box

2 Answers 2

2

Your URL patterns are incorrect. You haven't escaped . Your pattern should be

^https://some-app-123f\.firebaseapp\.com/.*$

You don't need to add the second URL to whitelist.

Sign up to request clarification or add additional context in comments.

Comments

1

If an improper program from the Dynamic Links prevents redirection to the sites that are beyond your control then you need to whitelist the URLs where the Dynamic Links can redirect to. For more information regarding whitelisting URLs please visit the link enter here .

4 Comments

Yep, I've seen that, however as mentioned in my question, asking what I am doing wrong with my whitelisting, as it isn't working... (also, your link is broken)
Please the check the link
Again, I have checked the link. What am I missing? Compare my whitelist above and apply it to the behaviour that is expected. Throwing a link as an answer isn't actually an answer...
I thought that information inside the link helped to solve the issue. However, you can changed the deep link for the FDL to match the pattern. For instance, to add the deep link testapp.test.com these pattern and deep link combination should work: ^testapp\.test\.com/.*$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.