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

fix: change API domain for twitter provider #11047

Merged

Conversation

Leechael
Copy link
Contributor

☕️ Reasoning

Switch X.com (former Twitter) API domain from twitter.com to x.com. When users switching between different accounts on x.com, the twitter.com/i/oauth2 endpoint still functional but not yet sync with up-to-date log in state. That's means:

  • The user previously logged in to twitter.com with account A.
  • Now, when visiting twitter.com, there is a forced redirect to x.com.
  • The user switches to account B on x.com.
  • The user then comes to our app and signs in with their Twitter account.
  • However, the authentication confirmation page shows account A instead of account B.

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

Fixes:

@Leechael Leechael requested a review from ThangHuuVu as a code owner May 31, 2024 08:21
Copy link

vercel bot commented May 31, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
auth-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 31, 2024 8:26am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview May 31, 2024 8:26am

Copy link

vercel bot commented May 31, 2024

@Leechael is attempting to deploy a commit to the authjs Team on Vercel.

A member of the Team first needs to authorize it.

@k-taro56
Copy link
Contributor

#10972

@k-taro56
Copy link
Contributor

I think we need to think about renaming the provider name.

@Leechael
Copy link
Contributor Author

I think we need to think about renaming the provider name.

That change might introduce breaking changes, Some users experienced unexpected behaviors after upgrading the next-auth.js.

If we going to rename the provider name, please considering in next big release version, not a minor bug fix.

@ndom91
Copy link
Member

ndom91 commented Jun 1, 2024

Yeah I've floating renaming the provider in general to the team. Lets see what they say 👍

@balazsorban44 balazsorban44 merged commit 38c5ee4 into nextauthjs:main Jun 2, 2024
6 of 7 checks passed
@Leechael Leechael deleted the fix-domain-change-in-twitter branch June 3, 2024 13:51
hillac pushed a commit to hillac/next-auth that referenced this pull request Jun 19, 2024
@jellohouse
Copy link

Is this already fixed in the latest "next-auth": "^5.0.0-beta.19" release?

I tried to upgrade but it's still going to twitter.com

@mrienstra
Copy link

mrienstra commented Jul 18, 2024

@jellohouse, last release of next-auth was June 1st, this PR was merged June 2nd, it was the second merge into main to "miss the boat": next-auth@5.0.0-beta.19...main

Just for convenience, relevant docs on installing a specific GitHub commit: npm, pnpm, yarn.

Edit: those changes were released in @auth/core@0.33.0, this worked for me (using pnpm):

  "pnpm": {
    "overrides": {
      "@auth/core": "0.33.0"
    }
  },

k3k8 pushed a commit to k3k8/next-auth that referenced this pull request Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Refers to `@auth/core` providers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants