-
Notifications
You must be signed in to change notification settings - Fork 8
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
Allow absolute urls in transition calls #171
Comments
@taion If you could make a proposal for the correct implementation of this feature, I would make a PR for it. |
Implementation-wise, we'd just add an extra check around Lines 64 to 68 in aab75c6
:// or starts with // "), then we'd use location.assign or location.replace .
|
Do we want to add this only to the BrowserProtocol or maybe to HashProtocol as well? |
Hmm, it's sort of "obvious" to me that this should work for |
Even though there are very few people using hash-routing nowadays, I think that the case with the external redirects may also apply to those people, so I'd add it to the |
Sounds good to me, then. Technically this could also work as a middleware that you would use on the client side, and just handle the navigation action before it hits the protocol. Then it could just be plugged into whatever context. |
Yeah, I really like the middleware approach. What could be the name of this middleware then? |
Sorry, I lost track of this. Something like |
Following the discussion in the PR 4Catalyzer/found-named-routes#57
It would be nice to allow absolute redirects inside the found's core.
A common use case would be redirecting the user to an external authentication provider, such as a SSO service.
In this case, we would need to determine that we have received an absolute URL and instead of modifying the
history
, make awindow.location
assignment.Currently, this is not possible, since
farce
would try to make apush
to a new route, which would not lead to a redirect in case of an absolute URL.The text was updated successfully, but these errors were encountered: