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: allow to disable client-side redirect for email provider #1379

Closed

Conversation

yannicktian
Copy link
Contributor

@yannicktian yannicktian commented Feb 26, 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:

@vercel
Copy link

vercel bot commented Feb 26, 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/6PEz5qJMjSTmUuWXkL39XfQV149n
✅ Preview: https://next-auth-git-fork-yannicktian-feature-no-redirect-0ca235.vercel.app

@vercel vercel bot temporarily deployed to Preview February 26, 2021 17:56 Inactive
@vercel vercel bot temporarily deployed to Preview February 26, 2021 18:10 Inactive
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.

Thanks! Will check the functionality locally myself, until then, there is a little request. Could you update the docs at https://github.com/nextauthjs/next-auth/blob/main/www/docs/getting-started/client.md#using-the-redirect-false-option

to mention that redirect can also be disabled for the email provider from now on?

@balazsorban44 balazsorban44 added client Client related code providers labels Feb 27, 2021
@nextauthjs nextauthjs deleted a comment from huynhminhcanh Mar 1, 2021
@nextauthjs nextauthjs deleted a comment from huynhminhcanh Mar 1, 2021
@vercel vercel bot temporarily deployed to Preview March 1, 2021 09:54 Inactive
@vercel vercel bot temporarily deployed to Preview March 1, 2021 09:56 Inactive
@yannicktian
Copy link
Contributor Author

@balazsorban44 I've updated the docs
image

Here is a screenshot of the email page
image

@balazsorban44
Copy link
Member

Sorry for the late discovery, but this should have been opened against the main branch, not canary! I'll close this PR as opening PRs against canary and change base to main introduces way too much merge conflicts and crashes with our release flow. SO SORRY FOR THIS! 🙏 could you please create a new PR with these changes against main?

@balazsorban44 balazsorban44 reopened this Mar 1, 2021
@balazsorban44 balazsorban44 changed the base branch from canary to main March 1, 2021 20:52
@github-actions github-actions bot added adapters Changes related to the core code concerning database adapters core Refers to `@auth/core` hacktoberfest-docs Relates to documentation pages style labels Mar 1, 2021
@balazsorban44 balazsorban44 changed the base branch from main to canary March 1, 2021 20:52
@yannicktian
Copy link
Contributor Author

@balazsorban44 Here you go: #1416
Sorry I saw somewhere that PR should be opened against the canary branch..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adapters Changes related to the core code concerning database adapters client Client related code core Refers to `@auth/core` hacktoberfest-docs Relates to documentation pages providers style
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants