Skip to content

Custom callback router loader #4

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

Open
sergiodxa opened this issue Jun 21, 2024 · 1 comment
Open

Custom callback router loader #4

sergiodxa opened this issue Jun 21, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@sergiodxa
Copy link

Right now the authLoader used in the callback route owns the whole loader, what happens if I want to do something else there? Example instead of doing:

export const loader = authLoader({ returnPathname: '/dashboard' });

I may want to know who the user is to change returnPathname. The only way I can think right now to let me customize it would be to wrap authLoader in another loader and parse the response, but since I don't have access to the session storage (see #2) I can't access the user data from there.

@PaulAsjes PaulAsjes added the enhancement New feature or request label Jul 18, 2024
@nickdirienzo
Copy link

nickdirienzo commented Mar 18, 2025

Relatedly, we have have per-customer subdomains on our app. I may want to redirect to a distinct subdomain based on the logged-in user. I could throw a redirect in onSuccess but that feels like a hack. @PaulAsjes should I file a separate issue for this use case? It felt related to this so figured to start here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

3 participants