Skip to content
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

Switch the redirect URL based on the user's information. #418

Open
5 tasks done
Fukao0129 opened this issue Sep 4, 2024 · 0 comments
Open
5 tasks done

Switch the redirect URL based on the user's information. #418

Fukao0129 opened this issue Sep 4, 2024 · 0 comments
Labels
feature request A feature has been asked for or suggested by the community

Comments

@Fukao0129
Copy link

Checklist

  • I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
  • I have looked into the API documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Describe the problem you'd like to have solved

After a user logs in, the page specified in Callback URL is displayed.
Then, a few seconds later, SDK redirects to / page.
I know this is an expected behavior because I've checked this FAQ.

What I'd like to implement is switch the redirect URL based on the user's app_metadata.

For example, if the user has available: true in app_metadata, SKD redirects to /dashboard.
If the user has available: false in app_metadata, SKD redirects to /sorry.

The redirect URL can be set in appState.target, but I understand this must be a literal value and cannot be dynamic.

Describe the ideal solution

We should make it possible to specify a conditional expression in appState.target to handle redirects more granularly.
Or, please implement a solution enabling finer-grained control over redirects from the callback URL.

Alternatives and current workarounds

Not at all.
If anyone has any ideas, please share with me.

I've tried to use a middleware, but it didn't work well.

Additional context

Since English is not my first language, I apologize in advance if there are any rude expressions.
I would be most grateful if some supplies a solution.

@Fukao0129 Fukao0129 added the feature request A feature has been asked for or suggested by the community label Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A feature has been asked for or suggested by the community
Projects
None yet
Development

No branches or pull requests

1 participant