- Notifications
You must be signed in to change notification settings - Fork3
Universal support for Auth.js.
License
NotificationsYou must be signed in to change notification settings
wobsoriano/authey
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
ExposeAuth.jsREST APIs to anyconnect-compatible Node.js framework.
npm install @auth/core authey
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
MIT
About
Universal support for Auth.js.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.