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

feat(provider): allow disabling redirection on sign in with email #1416

Conversation

yannicktian
Copy link
Contributor

@yannicktian yannicktian commented Mar 2, 2021

What:

In case the user is using the Email provider, make it possible to disable the redirection after the response from the server.

Why:

Example: To make a user signin or signup flow more fluid, it may be desirable to handle email signin without a page reload.

How:

The Email Provider has been added to the list of the providers that allow disabled redirection
canRedirectBeDisabled = isCredentials || isEmail

Checklist:

  • Documentation
  • Tests (Tested it locally so far, through the developer application, looking good there)
  • Ready to be merged

Also related:

closes #922

@vercel
Copy link

vercel bot commented Mar 2, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nextauthjs/next-auth/2YKd2vtxCgriUQyAA2MvA9SCphxB
✅ Preview: https://next-auth-git-fork-yannicktian-feature-allow-disabl-f6b9c1.vercel.app

@vercel vercel bot temporarily deployed to Preview March 2, 2021 16:32 Inactive
@github-actions github-actions bot added client Client related code core Refers to `@auth/core` hacktoberfest-docs Relates to documentation labels Mar 2, 2021
@vercel vercel bot temporarily deployed to Preview March 2, 2021 16:34 Inactive
@yannicktian yannicktian force-pushed the feature/allow-disable-redirect-email-provider branch from cf867d6 to 843f7a8 Compare March 2, 2021 16:38
@vercel vercel bot temporarily deployed to Preview March 2, 2021 16:38 Inactive
@balazsorban44 balazsorban44 changed the title Feature/allow disable redirect email provider feat(provider): allow disabling redirection on sign in with email Mar 2, 2021
Copy link
Member

@balazsorban44 balazsorban44 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Finally got a database working locally... 😅 I usually only focus on database-less flows, but I wanted to test this out myself. You have done a nice job, and thanks for the additional documentation!

@balazsorban44 balazsorban44 merged commit 71c78e8 into nextauthjs:main Mar 2, 2021
@github-actions
Copy link

github-actions bot commented Mar 2, 2021

🎉 This PR is included in version 3.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This PR is included in version 4.0.0-next.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

mnphpexpert added a commit to mnphpexpert/next-auth that referenced this pull request Sep 2, 2024
…xtauthjs#1416)

* feat: allow to disable client-side redirect for email provider

* docs(client): mention that redirect can also be disabled for email provider

* feat: only display one email input in email page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Client related code core Refers to `@auth/core` hacktoberfest-docs Relates to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option to disable redirect on signin
2 participants