Thijs Koerselman
Thijs Koerselman

Reputation: 23271

How to whitelist a parameter in a Firebase dynamic link

I am trying to use the following dynamic link:

https://links.myapp.com/invite?invitedBy=somestring which will then contain (amongst other things) the deeplink https://mywebapp.app/invite?invitedBy=somestring

In the dynamic links configuration for domain "links.myapp.com" I have set this rule to allow for the deeplink domain:

^https://mywebapp\.app/.*$

However, when I try the full URL in debug mode https://links.myapp.com/invite?invitedBy=somestring&d=1 I get the following warning:

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

I have not managed to found anything in the docs on how to whitelist a parameter.

I have tried adding this rule, to no avail: \??\&?(\w*=\w*)\&?

Upvotes: 4

Views: 817

Answers (1)

M_G
M_G

Reputation: 1208

We tried to solve this issue as well and found out that query parameters will just not work with Firebase Dynamic Links for the short link. By its nature a short link should be short and static and not include any parameters.

So either you need to (programmatically) create an individual short link in Firebase for every parameter value or implement your own solution.

Eventually we implemented our own web server which simply redirected our custom short link (containing a dynamic part) to the long version of Firebase Dynamic Links because we still wanted to use the social media tags and detection of an installed app or forwarding to AppStore/PlayStore or a landing page for non-mobile users.

Upvotes: 1

Related Questions