Support dynamic redirect destinations
See original GitHub issueIs your feature request related to a problem? Please describe. As mentioned in the limitations, there isn’t built-in support for custom redirect destinations based on the user’s auth status. This limits the usefulness of the redirects.
Describe the solution you’d like and how you’d implement it
Allow users to provide functions for the authPageURL
and appPageURL
config properties that should return the appropriate URL. We could pass either ctx
or window
to the function, depending on the context.
// ctx would be defined when server-side redirecting, window for client-side
({ ctx, window }) => {
// some logic
return '/my-auth-page?next=/my-app/'
}
Is this a breaking change? No. We would still support static values for the config options.
Describe alternatives you’ve considered None
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
How Dynamic Destination URL (DDU) works?
Dynamic Destination URL (DDU) allows you to redirect visitors to different destination URLs with the same tracking link by just adding a ...
Read more >Dynamic URL redirects: 301 to the future
With Dynamic Redirects, users can redirect visitors to another webpage or website based upon hundreds of options such as the visitor's country ...
Read more >Redirects that match dynamic change in source and ...
Redirects that match dynamic change in source and destination URL ... The problem is that we need to set a redirect that URL...
Read more >WebHops and Redirects in Dynamic DNS | Dyn Help Center
Redirecting a Dynamic DNS (DynDNS Pro) host to a different location is a fairly simple process. ... select the WebHop Redirect option under...
Read more >How can I increase the limit of redirects or use dynamic ...
In this article, we describe methods to redirect a path to another location by using Next.js and Vercel features. Using Serverless Functions or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@tlays Thanks for the thoughtful feedback! I agree with all of your suggestions.
Yes
Yes
I agree
I agree, this is a good idea
Opened an issue to update the documentation and example: #122