Reputation: 201
I have a weird issue with Firebase Dynamic Links in my Capacitor app. When using deep links to authenticate users via SAML, it looks to be losing specific URL parameters but only in my staging environment on Heroku.
redirectUrl
Browser.open({ url: redirectUrl })
res.redirect
) (which is a Firebase Dynamic Link)apn
, ibi
, ofl
) are missing after the redirect chain.I'm using Capacitor Browser to open the link:
// This works locally but not in staging
Browser.open({ url: redirectUrl });
The full URL from server logs (works correctly):
https://myapp.page.link/?link=https%3A%2F%2Flink.myapp.com%2F%3Fauth_token%3DeyJ0eXAi...&apn=com.mycompany.app&ibi=com.mycompany.app&ofl=get.myapp.com
What I see in Capacitor Browser after redirect (truncated):
https://myapp.page.link/?link=https%3A%2F%2Flink.myapp.com%2F%3Fauth_token%3DeyJ0eXAi...
Notice how the parameters apn, ibi, and ofl are missing from the URL after the redirect chain.
The primary difference between my environments is that the staging API runs on Heroku while my local API runs directly on my development machine.
What could be causing Heroku to drop these specific parameters during the redirect chain? I just don't quite understand why the entire flow works perfectly fine locally but not when the API is deployed on Heroku, it could be a red herring.
Upvotes: 0
Views: 26