mirror of
https://github.com/SrIzan10/next-auth.git
synced 2026-05-01 10:55:20 +00:00
41 lines
896 B
Markdown
41 lines
896 B
Markdown
---
|
|
id: twitter
|
|
title: Twitter
|
|
---
|
|
|
|
## Documentation
|
|
|
|
https://developer.twitter.com
|
|
|
|
## Configuration
|
|
|
|
https://developer.twitter.com/en/apps
|
|
|
|
## Options
|
|
|
|
The **Twitter Provider** comes with a set of default options:
|
|
|
|
- [Twitter Provider options](https://github.com/nextauthjs/next-auth/blob/ead715219a5d7a6e882a6ba27fa56b03954d062d/src/providers/twitter.js)
|
|
|
|
You can override any of the options to suit your own use case.
|
|
|
|
## Example
|
|
|
|
```js
|
|
import Providers from `next-auth/providers`
|
|
...
|
|
providers: [
|
|
Providers.Twitter({
|
|
clientId: process.env.TWITTER_CLIENT_ID,
|
|
clientSecret: process.env.TWITTER_CLIENT_SECRET
|
|
})
|
|
]
|
|
...
|
|
```
|
|
|
|
:::tip
|
|
You must enable the _"Request email address from users"_ option in your app permissions if you want to obtain the users email address.
|
|
:::
|
|
|
|

|