Skip to content
Auth.js 项目现在加入了 Better Auth
入门提供方(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.