You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to propose the same thing on remix-run/remix#5328 for a different reason;
Our authentication flow involves redirecting the user to a page and then back to where they were. This is initiated from actions or loaders. Our problem is that when we call loaders of other routes using useFetcher the loader/action being called has no way of knowing where the request is being originated from. As a fall back we are returning the user to the (loader's) request url which is sometimes different from the route the user was in and that's not ideal.
A solution from our end can be watching for location changes and then setting a cookie that contains the current url and use that information in loaders/actions when initiating the authentication flow. However, this requires a logic to ignore this cookie during SSR time to avoid sometimes redirecting the user to a very old request origin. Because of that;I believe adding Referrer header to action/loader requests to let the handler know where the request is being originated from is worth considering.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to propose the same thing on remix-run/remix#5328 for a different reason;
Our authentication flow involves redirecting the user to a page and then back to where they were. This is initiated from actions or loaders. Our problem is that when we call loaders of other routes using
useFetcher
the loader/action being called has no way of knowing where the request is being originated from. As a fall back we are returning the user to the (loader's) request url which is sometimes different from the route the user was in and that's not ideal.A solution from our end can be watching for location changes and then setting a cookie that contains the current url and use that information in loaders/actions when initiating the authentication flow. However, this requires a logic to ignore this cookie during SSR time to avoid sometimes redirecting the user to a very old request origin. Because of that;I believe adding
Referrer
header to action/loader requests to let the handler know where the request is being originated from is worth considering.Beta Was this translation helpful? Give feedback.
All reactions