New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Password-protected links w/ device targeting enabled redirects to the original destination URL #385
Comments
Ah good catch – this is expected behavior since device targeting is not supported currently for password protected pages. Curious what would your use case be? Will document this in the meantime! |
@steven-tey Thank you for verifying this is the expected behavior. Yes, it'd be great if this limitation is documented so users don't get confused when combining several options for their links. As for an example use case, I don't have any at the moment. As I said, I've been just testing the app and was curious about it from the dev perspective 👨🔬 Although I can imagine a case when protected links are necessary (e.g. URL params contain some sensitive info), I don't think such a scenario should support device targeting unless there is a high demand for it. |
Just documented this: https://dub.co/help/article/how-to-create-link Thank you so much again for the heads-up! |
@unrenamed Good news – this limitation has been fixed in our latest update: https://dub.co/changelog/improved-password-links You can now use password protection with geo/device targeting! :) |
I was testing the link creation and noticed that if iOS or Android targeting is enabled and the link is protected with a password, the iOS / Android users will be redirected to the original destination URL on opening.
Steps to reproduce:
Actual behavior:
Both links redirect to the Destination URL (https://www.google.com in this example).
Expected outcome:
Links opened on iOS/Android redirect to URLs provided in Step 4.
I haven't found any explanation for such behavior in Dub Help Center . Yet I'm not quite sure this is a bug. Does anyone have an idea whether this is a bug or the actual behavior is already expected?
Dev note
This makes sense given the code to rewrite the URL to
/protected/[domain]/[key]
lib/middleware/link.ts is executed earlier than the middleware starts checking the user agent data containing device details. However, this finding doesn't answer my question above.The text was updated successfully, but these errors were encountered: