File: reddit.md | Updated: 11/15/2025
š NextAuth.js is now part of Better Auth !
This is documentation for NextAuth.js v3, which is no longer actively maintained.
For up-to-date documentation, see the **latest version ** (v4).
Version: v3
On this page
Documentationā
https://www.reddit.com/dev/api/
Configurationā
https://www.reddit.com/prefs/apps/
Optionsā
The Reddit Provider comes with a set of default options:
You can override any of the options to suit your own use case.
Exampleā
import Providers from `next-auth/providers`...providers: [ Providers.Reddit({ clientId: process.env.REDDIT_CLIENT_ID, clientSecret: process.env.REDDIT_CLIENT_SECRET })]...
danger
Reddit requires authorization every time you go through their page.
danger
Only allows one callback URL per Client ID / Client Secret.
tip
This Provider template only has a one hour access token to it and only has the 'identity' scope. If you want to get a refresh token as well you must follow this:
providers: [ { id: "reddit", name: "Reddit", clientId: process.env.REDDIT_CLIENT_ID, clientSecret: process.env.REDDIT_CLIENT_SECRET, scope: "identity mysubreddits read", //Check Reddit API Documentation for more. The identity scope is required. type: "oauth", version: "2.0", params: { grant_type: "authorization_code" }, accessTokenUrl: " https://www.reddit.com/api/v1/access_token", authorizationUrl: "https://www.reddit.com/api/v1/authorize?response_type=code&duration=permanent", profileUrl: "https://oauth.reddit.com/api/v1/me", profile: (profile) => { return { id: profile.id, name: profile.name, email: null, } }, },]