Add Auth to Next.js with Ory!

Ory is a best-in-class open source identity and access ecosystem. With Ory you can easily add authentication (email/username + password, passwordless, 2FA, WebAuthN, social sign in, ...), OAuth2 and OpenID Connect, scalable permission management, and zero trust networking to any application. With Vercel and Next.js this only takes a few lines of code:

// File: pages/api/.ory/[...paths].ts
import { config, createApiHandler } from '@ory/integrations/next-edge'

export { config }
export default createApiHandler({
  fallbackToPlayground: true

Once integrated, try it out! Create an example account or sign in, recover your account or verify your email address! All using open source Ory Kratos in minutes with just a few lines of code

and Vercel's Edge Functions. To learn more about the integration, check one of the recommended guides: