Twitter is currently the only built-in provider using the OAuth 1.0 spec. This means that you won't receive an
refresh_token, but an
oauth_token_secret respectively. Remember to add these to your database schema, in case if you are using an Adapter.
The Twitter Provider comes with a set of default options:
You can override any of the options to suit your own use case.
import TwitterProvider from "next-auth/providers/twitter";
You must enable the "Request email address from users" option in your app permissions if you want to obtain the users email address.
Twitter supports OAuth 2, which is currently opt-in. To enable it, simply add
version: "2.0" to your Provider configuration:
version: "2.0", // opt-in to Twitter OAuth 2.0
Email is currently not supported by Twitter OAuth 2.0.