Files
WRNexusJS/packages/auth/src/index.ts
T
Clintchiz a3ddd39b7b
Quality / quality (ubuntu-latest) (push) Failing after 14m38s
Quality / quality (windows-latest) (push) Canceled after 0s
feat: centralize application framework primitives
2026-08-22 23:07:46 +05:30

109 lines
2.5 KiB
TypeScript

export { createAuthEngine, type AuthEngine } from "./engine.ts";
export type { AuthStore } from "./store.ts";
export { MemoryAuthStore } from "./stores/memory.ts";
export { SqlAuthStore } from "./stores/sql.ts";
export {
authSession,
requireAuth,
establishAuthSession,
clearAuthSession,
getAuthUser,
getAuthSession,
requireAuthUser,
AuthRequiredError,
isAuthenticatedContext,
AUTH_SESSION_KEY,
} from "./middleware.ts";
export {
createAuthHttpHandlers,
type AuthHttpOptions,
type AuthPasskeyHttpOptions,
} from "./http/index.ts";
export {
authPlugin,
authComponentsDir,
validateProductionAuthConfig,
type AuthConfig,
type AuthRoutesConfig,
type AuthPluginOptions,
type AuthAuditIssue,
} from "./plugin.ts";
export {
setDefaultAuthEngine,
clearDefaultAuthEngine,
setDefaultAuthSchemas,
setDefaultAuthRouteOptions,
tryGetDefaultAuthEngine,
getDefaultAuthEngine,
getDefaultAuthSchemas,
getDefaultAuthRouteOptions,
hasDefaultAuthEngine,
type DefaultAuthRouteOptions,
} from "./runtime.ts";
export { createAuthSecretProtector } from "./protector.ts";
export { evaluateAuthRisk, type RiskPolicy } from "./risk.ts";
export {
normalizeEmail,
normalizePhone,
normalizeUsername,
normalizeIdentity,
inferIdentityType,
publicUser,
safeAuthReturnTo,
} from "./normalize.ts";
export {
generateTotpSecret,
generateTotp,
verifyTotp,
totpUri,
encodeBase32,
decodeBase32,
} from "./totp/index.ts";
export {
MemoryPasskeyChallengeStore,
assertPasskeyProvider,
type PasskeyChallengeStore,
type PasskeyChallengeRecord,
type PasskeyChallengeKind,
} from "./passkeys/index.ts";
export * from "./types.ts";
export {
registerSchema,
signUpSchema,
loginSchema,
verificationRequestSchema,
verificationTokenSchema,
passwordResetRequestSchema,
passwordResetSchema,
invitationAcceptSchema,
magicLinkRequestSchema,
magicLinkConsumeSchema,
otpLoginRequestSchema,
otpLoginCompleteSchema,
otpIssueSchema,
otpSchema,
mfaOtpRequestSchema,
mfaSchema,
sessionRevokeSchema,
impersonationStartSchema,
passkeyRegistrationOptionsSchema,
passkeyRegistrationVerifySchema,
passkeyAuthenticationOptionsSchema,
passkeyAuthenticationVerifySchema,
authenticatorSetupSchema,
authenticatorConfirmSchema,
authenticatorDisableSchema,
recoveryCodesSchema,
emptyActionSchema,
changePasswordSchema,
authSchemas,
authBrowserSchemaMap,
authBrowserSchemaDescriptors,
resolveAuthSchemas,
type AuthSchemaSet,
type AuthSchemaOverrides,
} from "./validation.ts";
export * from "./helpers.ts";