Skip to content

Commit

Permalink
fix: change API domain for twitter provider (#11047)
Browse files Browse the repository at this point in the history
  • Loading branch information
Leechael committed Jun 2, 2024
1 parent 0ccef3d commit 38c5ee4
Showing 1 changed file with 6 additions and 6 deletions.
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

0 comments on commit 38c5ee4

Please sign in to comment.