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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions packages/core/src/providers/twitter.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* <div style={{backgroundColor: "#000", display: "flex", justifyContent: "space-between", color: "#fff", padding: 16}}>
* <span>Built-in <b>Twitter</b> integration.</span>
* <a href="https://www.twitter.com/">
* <a href="https://www.x.com/">
* <img style={{display: "block"}} src="https://authjs.dev/img/providers/twitter.svg" height="48" />
* </a>
* </div>
Expand All @@ -11,7 +11,7 @@
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

/**
* [Users lookup](https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-me)
* [Users lookup](https://developer.x.com/en/docs/twitter-api/users/lookup/api-reference/get-users-me)
*/
export interface TwitterProfile {
data: {
Expand Down Expand Up @@ -125,7 +125,7 @@ export interface TwitterProfile {
*
* ### Resources
*
* - [Twitter App documentation](https://developer.twitter.com/en/apps)
* - [Twitter App documentation](https://developer.x.com/en/apps)
*
* ## OAuth 2
* Twitter supports OAuth 2, which is currently opt-in. To enable it, simply add version: "2.0" to your Provider configuration:
Expand Down Expand Up @@ -185,10 +185,10 @@ export default function Twitter(
type: "oauth",
checks: ["pkce", "state"],
authorization:
"https://twitter.com/i/oauth2/authorize?scope=users.read tweet.read offline.access",
token: "https://api.twitter.com/2/oauth2/token",
"https://x.com/i/oauth2/authorize?scope=users.read tweet.read offline.access",
token: "https://api.x.com/2/oauth2/token",
userinfo:
"https://api.twitter.com/2/users/me?user.fields=profile_image_url",
"https://api.x.com/2/users/me?user.fields=profile_image_url",
profile({ data }) {
return {
id: data.id,
Expand Down
Loading