Skip to content

Commit 38c5ee4

Browse files
authored
fix: change API domain for twitter provider (#11047)
1 parent 0ccef3d commit 38c5ee4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/core/src/providers/twitter.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* <div style={{backgroundColor: "#000", display: "flex", justifyContent: "space-between", color: "#fff", padding: 16}}>
33
* <span>Built-in <b>Twitter</b> integration.</span>
4-
* <a href="https://www.twitter.com/">
4+
* <a href="https://www.x.com/">
55
* <img style={{display: "block"}} src="https://authjs.dev/img/providers/twitter.svg" height="48" />
66
* </a>
77
* </div>
@@ -11,7 +11,7 @@
1111
import type { OAuthConfig, OAuthUserConfig } from "./index.js"
1212

1313
/**
14-
* [Users lookup](https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-me)
14+
* [Users lookup](https://developer.x.com/en/docs/twitter-api/users/lookup/api-reference/get-users-me)
1515
*/
1616
export interface TwitterProfile {
1717
data: {
@@ -125,7 +125,7 @@ export interface TwitterProfile {
125125
*
126126
* ### Resources
127127
*
128-
* - [Twitter App documentation](https://developer.twitter.com/en/apps)
128+
* - [Twitter App documentation](https://developer.x.com/en/apps)
129129
*
130130
* ## OAuth 2
131131
* Twitter supports OAuth 2, which is currently opt-in. To enable it, simply add version: "2.0" to your Provider configuration:
@@ -185,10 +185,10 @@ export default function Twitter(
185185
type: "oauth",
186186
checks: ["pkce", "state"],
187187
authorization:
188-
"https://twitter.com/i/oauth2/authorize?scope=users.read tweet.read offline.access",
189-
token: "https://api.twitter.com/2/oauth2/token",
188+
"https://x.com/i/oauth2/authorize?scope=users.read tweet.read offline.access",
189+
token: "https://api.x.com/2/oauth2/token",
190190
userinfo:
191-
"https://api.twitter.com/2/users/me?user.fields=profile_image_url",
191+
"https://api.x.com/2/users/me?user.fields=profile_image_url",
192192
profile({ data }) {
193193
return {
194194
id: data.id,

0 commit comments

Comments
 (0)