File: reddit.md | Updated: 11/15/2025
š NextAuth.js is now part of Better Auth !
Version: v4
On this page
Documentationā
https://www.reddit.com/dev/api/
App Configurationā
/api/auth/callback/reddit:
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 RedditProvider from "next-auth/providers/reddit";...providers: [ RedditProvider({ 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: [ RedditProvider({ clientId: process.env.REDDIT_CLIENT_ID, clientSecret: process.env.REDDIT_CLIENT_SECRET, authorization: { params: { duration: "permanent", }, }, }),]