跳到内容
从 NextAuth.js v4 迁移?阅读 我们的迁移指南.

Nextcloud 提供者

资源

设置

回调 URL

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

环境变量

AUTH_NEXTCLOUD_ID
AUTH_NEXTCLOUD_SECRET
AUTH_NEXTCLOUD_ISSUER

配置

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 和团队 -2024