Skip to content
需要从 NextAuth.js v4 升级到最新版本吗?请查阅 版本升级指南
入门提供方(Providers)42 School

42School Provider

Resources

Setup

Callback URL

https://example.com/api/auth/callback/42-school

Environment Variables

AUTH_42_SCHOOL_ID
AUTH_42_SCHOOL_SECRET

Configuration

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

Notes

  • 42 returns a field on Account called created_at which is a number, this is different from the default schema’s datatype for this field. Check out the 42 School docs for more info. Make sure to add or edit this field in your database schema in case if you are using an database adapter.