تخطَّ إلى المحتوى

Auth

هذا المحتوى غير متوفر بلغتك بعد.

ɳSelf includes nHost Auth as a built-in service, providing a full authentication backend out of the box.

CapabilityDescription
JWT tokensShort-lived access tokens + refresh tokens
OAuth 2.0GitHub, Google, Facebook, Apple, and more
Magic linksPasswordless email login
Email/passwordStandard username/password auth
MFATime-based one-time passwords (TOTP)
User managementRoles, metadata, session management

Auth is a core service, it is always enabled. No plugin required.

VariableDescriptionDefault
AUTH_JWT_SECRETJWT signing secretAuto-generated
AUTH_CLIENT_URLAllowed redirect URL after loginRequired
AUTH_SERVER_URLAuth service public URLDerived from BASE_DOMAIN
AUTH_RATE_LIMITAuth endpoint rate limit30r/m
AUTH_SMTP_HOSTSMTP host for magic link emailsOptional

To enable OAuth providers, set the relevant env vars:

AUTH_PROVIDER_GITHUB_ENABLED=true
AUTH_PROVIDER_GITHUB_CLIENT_ID=your-client-id
AUTH_PROVIDER_GITHUB_CLIENT_SECRET=your-secret

Home | _Sidebar