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

Option to disable redirect on signin #922

Closed
fandy opened this issue Dec 7, 2020 · 7 comments · Fixed by #1416
Closed

Option to disable redirect on signin #922

fandy opened this issue Dec 7, 2020 · 7 comments · Fixed by #1416
Labels
enhancement New feature or request help needed The maintainer needs help due to time constraint/missing knowledge

Comments

@fandy
Copy link

fandy commented Dec 7, 2020

Summary of proposed feature
Would be great if there were an option in the email provider to disable the redirect to /api/auth/verify-request?provider=email&type=email on signin, while also knowing whether the verification succeeded or failed on the client.

Purpose of proposed feature
Better UX since you are not taken to a different page, and can instead show a state change.

Potential problems
None

Please indicate if you are willing and able to help implement the proposed feature.
Possibly

@fandy fandy added the enhancement New feature or request label Dec 7, 2020
@balazsorban44
Copy link
Member

Could you please fill out the feature request issue template?

@balazsorban44 balazsorban44 added incomplete Insufficient reproduction. Without more info, we won't take further actions/provide help. and removed incomplete Insufficient reproduction. Without more info, we won't take further actions/provide help. labels Dec 7, 2020
@fandy
Copy link
Author

fandy commented Dec 15, 2020

@balazsorban44 done

@balazsorban44 balazsorban44 added the help needed The maintainer needs help due to time constraint/missing knowledge label Dec 15, 2020
@styxlab
Copy link
Contributor

styxlab commented Jan 12, 2021

Having exactly the same issue. I can change the custom route in the configuration (pages: { verifyRequest: '/custom-url' }) but would like to avoid an additional post request and display a success message without leaving the page. As far as I can see there are at least two additions needed:

  1. A way to disable the redirect with an configuration option, maybe pages: { verifyRequest: null }?
  2. A return value from signIn(), e.g. Promise<boolean> where the return value is either true or false.

@github-actions
Copy link

github-actions bot commented Mar 2, 2021

🎉 This issue has been resolved in version 3.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@balazsorban44
Copy link
Member

balazsorban44 commented Mar 2, 2021

@fandy it took some time, but this is now possible 😅 Sorry for the delay, I haven't had the confidence with the source code just yet when you opened this issue.

Check the docs for how to use it: https://next-auth.js.org/getting-started/client#using-the-redirect-false-option

@fandy
Copy link
Author

fandy commented Mar 2, 2021

@balazsorban44 beautiful, thank you for the update!

@github-actions
Copy link

🎉 This issue has been resolved in version 4.0.0-next.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help needed The maintainer needs help due to time constraint/missing knowledge
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants