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

Support returnTo in withMiddlewareAuthRequiredFactory #1322

Closed
5 tasks done
cdaringe opened this issue Jul 28, 2023 · 1 comment · Fixed by #1342
Closed
5 tasks done

Support returnTo in withMiddlewareAuthRequiredFactory #1322

cdaringe opened this issue Jul 28, 2023 · 1 comment · Fixed by #1342
Labels
enhancement New feature or request

Comments

@cdaringe
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

On successful auth using withMiddlewareAuthRequiredFactory, I want to returnTo my own specified URL, but cannot because withMiddlewareAuthRequiredFactory hard-codes a value.

Describe the ideal solution

Support an input into the middleware constructor OR (better) the middleware fn itself to accept a returnTo param, as with similar APIs in this SDK.

Alternatives and current workarounds

I have to redirect or nav my user from within my application, which is undesirable because it adds a highly undesirable entry into my user's navigation history/stack.

Additional context

This is for the next@beta, at the time of writing!

@adamjmcgrath
Copy link
Contributor

Thanks for raising this @cdaringe

Yep, since we support a returnTo in withPageAuthRequired, I don't see why we can't support the option here. I'm not sure when we might be able to get round it, bit will leave this open as an enhancement.

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

Successfully merging a pull request may close this issue.

2 participants