Skip to content
Migrating from NextAuth.js v4? Read our migration guide.
Getting Started
Providers
Cloudinary

Cloudinary Provider

Resources

Setup

Callback URL

https://example.com/api/auth/callback/cloudinary

Environment Variables

AUTH_CLOUDINARY_ID
AUTH_CLOUDINARY_SECRET

Configuration

/auth.ts
import NextAuth from "next-auth"
import Cloudinary from "next-auth/providers/cloudinary"
 
export const { handlers, auth, signIn, signOut } = NextAuth({
  providers: [Cloudinary],
})

Notes

  • The Cloudinary userinfo endpoint returns only a sub which is used for both the id and the email in the user’s profile. If you’d like to get more information about the user – you can use the Cloudinary Account Provisioning API
  • If the OAuth token is used against the Admin/Upload API, the user must be assigned a Master Admin role within the product environment
Auth.js © Balázs Orbán and Team - 2024