Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Universal support for Auth.js.

License

NotificationsYou must be signed in to change notification settings

wobsoriano/authey

Repository files navigation

ExposeAuth.jsREST APIs to anyconnect-compatible Node.js framework.

Installation

npm install @auth/core authey

Usage

Express

importexpressfrom'express'import{createAuthMiddleware}from'authey'importtype{AuthConfig}from'@auth/core'importAppleProviderfrom'@auth/core/providers/apple'importGoogleProviderfrom'@auth/core/providers/google'importEmailProviderfrom'@auth/core/providers/email'constapp=express()constauthConfig:AuthConfig={// You can generate a secret here https://generate-secret.vercel.app/32secret:process.env.AUTH_SECRET,trustHost:Boolean(process.env.AUTH_TRUST_HOST),providers:[// OAuth authentication providersAppleProvider({clientId:process.env.APPLE_ID,clientSecret:process.env.APPLE_SECRET,}),GoogleProvider({clientId:process.env.GOOGLE_ID,clientSecret:process.env.GOOGLE_SECRET,}),// Sign in with passwordless email linkEmailProvider({server:process.env.MAIL_SERVER,from:'<no-reply@example.com>',}),],}app.use(createAuthMiddleware(authConfig))

Nuxt

// server/middleware/auth.tsimport{createAuthMiddleware}from'authey'import{fromNodeMiddleware}from'h3'exportdefaultfromNodeMiddleware(createAuthMiddleware(authConfig))

Fastify

importFastifyfrom'fastify'importMiddiefrom'@fastify/middie'import{createAuthMiddleware}from'authey'asyncfunctionbuild(){constfastify=Fastify()awaitfastify.register(Middie)fastify.use(createAuthMiddleware(authConfig))returnfastify}// Plugin: https://github.com/wobsoriano/fastify-next-auth

License

MIT

About

Universal support for Auth.js.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors3

  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp