https://authjs.dev
Auth.js | Authentication for the Web
Auth.js | Authentication for the WebSkip to contentMigrating from NextAuth.js v4? Read our migration guide.Auth.jsGetting StartedGuidesAPI referenceConceptsSecuritySearch...CTRL KAIAsk AIGitHub22.2kLightSearch...CTRL KAuth.jsAuthentication for the Web.Free and open source.Get StartedSourceLooking for a hosted alternative?Use ClerkSponsoredMore// auth.ts import NextAuth from "next-auth" import GitHub from "next-auth/providers/github" export const { auth, handlers } = NextAuth({ providers: [GitHub] }) // middleware.ts export { auth as middleware } from "@/auth" // app/api/auth/[...nextauth]/route.ts import { handlers } from "@/auth" export const { GET, POST } = handlers // src/auth.ts import { SvelteKitAuth } from "@auth/sveltekit" import GitHub from '@auth/sveltekit/providers/github' export const { handle } = SvelteKitAuth({ providers: [GitHub], }) // src/hooks.server.ts export { handle } from "./auth" // server.ts import { express } from "express" import { ExpressAuth } from "@auth/express" import GitHub from "@auth/express/providers/github" const app = express() app.use("/auth/*", ExpressAuth({ providers: [GitHub] })) // src/routes/plugin@auth.ts import { QwikAuth } from "@auth/qwik" import GitHub from "@auth/qwik/providers/github" export const { onRequest, useSession } = QwikAuth$(() => ({ providers: [GitHub] })) Highlighted GuidesSee allConfiguring OAuth providersCustomize a built-in one or set up your own.OAuth with GitHubStep-by-step guide to set up an OAuth provider.Custom Signin PageCreate a page that matches your app's design.Example AppsNext.jsVisitCloneSvelteKitVisitCloneExpressVisitCloneQwikVisitCloneSupports all these providers and more!About Auth.jsIntroductionSecurityDiscord CommunityPowered byVercelDownloadGitHubNPMAcknowledgementsContributorsSponsorsAuth.js © Balázs Orbán and Team - 2024
en
en
1727408439
https://authjs.dev
Redaguoti svetainę?
ka tu darai?