Skip to main content

Get credentials

1

Create an app

Go to Reddit App Preferences and scroll to the bottom. Click Create another app…. Select web app as the type and add your redirect URI:
2

Copy credentials

After saving, the client ID appears directly under the app name (a short string like abc123XYZ). Click edit to reveal or regenerate the secret.

Configuration

lib/theauth.ts

Endpoints

Scopes

Default scope: identity. Scopes you pass are added on top of the default.

User data returned

Reddit does not expose the user’s email address via OAuth. If your app requires an email, prompt the user to enter one after sign-in and store it separately.
Reddit’s token endpoint uses HTTP Basic authentication rather than posting credentials in the request body. theAuth handles this automatically.

Handling missing email

The oauth() plugin matches or creates a theAuth user by email. Because Reddit returns none, a Reddit callback does not produce a session: the provider account is stored without a user, and the callback responds with JSON (isNewAccount, account, userInfo) instead of redirecting. The same happens on later sign-ins with that account. To support Reddit sign-in you need to collect an email yourself and attach the account to a user, for example with POST /auth/oauth/link from an authenticated session or linkAccount on a module built with createOAuthModule.

OAuth overview

Generic OAuth 2.0 setup and account linking behavior.

Discord

Another community-focused OAuth provider.

GitHub

Developer-focused OAuth provider with similar setup.

Authentication overview

All sign-in methods available in theAuth.
Last modified on October 7, 2026