Skip to content
Migrating from NextAuth.js v4? Read our migration guide.

Nextcloud Provider

Resources

Setup

Callback URL

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

Environment Variables

AUTH_NEXTCLOUD_ID
AUTH_NEXTCLOUD_SECRET
AUTH_NEXTCLOUD_ISSUER

Configuration

import NextAuth from "next-auth"
import Nextcloud from "next-auth/providers/nextcloud"
 
const response = await NextAuth({
  providers: [
    Nextcloud({
      clientId: process.env.AUTH_NEXTCLOUD_ID,
      clientSecret: process.env.AUTH_NEXTCLOUD_SECRET,
      issuer: process.env.AUTH_NEXTCLOUD_ISSUER,
    }),
  ],
})
Auth.js © Balázs Orbán and Team - 2024