Skip to content

Commit

Permalink
docs: Note about Twitter/X OAuth 2 (#11937)
Browse files Browse the repository at this point in the history
  • Loading branch information
petrbela authored Oct 1, 2024
1 parent d3e32ae commit eb6c3f5
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions docs/pages/getting-started/providers/twitter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Code } from "@/components/Code"

<img align="right" src="/img/providers/twitter.svg" height="64" width="64" />

# Twitter Provider
# Twitter/X Provider

## Resources

Expand Down Expand Up @@ -97,17 +97,7 @@ app.use("/auth/*", ExpressAuth({ providers: [Twitter] }))
</Code.Express>
</Code>

To enable OAuth 2.0, simply add version: "2.0" to your Provider configuration.

```ts filename="./auth.ts" {4}
Twitter({
clientId: process.env.TWITTER_ID,
clientSecret: process.env.TWITTER_SECRET,
version: "2.0", // opt-in to Twitter OAuth 2.0
})
```

### Notes

- Email is currently not supported by Twitter OAuth 2.0.
- You must enable the "Request email address from users" option in your app permissions if you want to obtain the users email address.
- Auth.js now uses Twitter/X OAuth 2.0 by default. There's no need to set `version` anymore.
- Email is currently not supported by Twitter/X OAuth 2.0.

0 comments on commit eb6c3f5

Please sign in to comment.