Packages@robojs/auth
DIRECTORY
API reference for @robojs/auth
@robojs/auth
API reference documentation for @robojs/auth.
Classes
Argon2Hasher- Default implementation of PasswordHasher using Argon2id.
Interfaces
Argon2Params- Tuning parameters for the Argon2id hashing algorithm.AuthMailer- Interface mail adapter implementations must satisfy.AuthPluginOptions- Configuration options for the@robojs/authplugin.ConfigureAuthProxyRuntimeOptions- Runtime options for configureAuthProxyRuntime (upstream proxy mode).ConfigureAuthRuntimeOptions- Runtime configuration for configureAuthRuntime (local mode).DeviceSession- Public shape returned byGET /sessionsand thegetSessionsclient helper.EmailPasswordAuthorizeContext- Context object passed to customauthorizeimplementations.EmailPasswordProviderMetadata- Metadata returned from the Email/Password provider factory.EmailPasswordProviderOptions- Options accepted by the Email/Password provider factory.EmailPasswordRouteContext- Arguments provided to Email/Password route overrides while processing a request.EmailPasswordRouteOverrides- Optional handlers that replace built-in Email/Password routes.EmailsOptions- Email system configuration controlling sender identity, mailer wiring,.HashPasswordOptions- Optional overrides when calling hashPassword.PasswordAdapter- Auth.js adapter contract extended with password management helpers.PasswordHashMetadata- Structured representation of a PHC-formatted Argon2id hash string.PasswordHasher- Interface for password hashing implementations.PasswordRecord- Persistent password metadata stored by the email-password provider.PrismaAdapterModelOptions- Customizes Prisma model names when your schema deviates from the defaults.PrismaAdapterOptions- Complete configuration object for createPrismaAdapter.PrismaClientLike- Minimal Prisma client surface required by createPrismaAdapter.RequestPayloadHandle- Utility handle for inspecting and mutating a parsed request payload.SwitchSessionResult- Result shape forPOST /sessions/switch.
Type Aliases
AuthEmailEvent- Events that can trigger custom email workflows.EmailBuilder- Builder used to assemble a message on-demand.EmailContext- Contextual data passed to every email template or builder, enabling.EmailPasswordAuthorizeEmailPasswordRouteHandlerMailAttachment- Attachment payload supplied to a mailer when sending transactional emails.MailMessage- Message contract understood by mail adapters and builders.MailParty- Represents an email party (sender or recipient).MaybePromise- Helper representing a value or promise thereof.ReactEmailRenderable- Union describing values accepted by React email renderers.ReactTemplateRenderer- Function signature for generating React email output using react-email.ReactTemplateResult- Normalized result from invoking a React template renderer.ResendMailerOptions- Wire-up options passed to the Resend-backed mailer.TemplateConfig- Describes how automated emails are rendered or composed—either via inline.TemplateOverride- User-supplied override merged with the default template.TemplateValue- Template helper value that can be static, lazy (Promise), or computed from.
Functions
AssertPasswordAdapter- Validates that a supplied Auth.js adapter implements password helper methods.ClearSessions- Removes all sessions from the device and signs out completely.ConfigureAuthProxyRuntime- Configures upstream proxy mode where Robo forwards auth routes to another.ConfigureAuthRuntime- Initializes Auth.js in local mode by creating a reusable handler that Robo's.CreateAuthRequestHandler- Bridges Robo.js requests to Auth.js so plugin routes can reuse the official handler.CreateFlashcoreAdapter- Creates a password-capable Auth.js adapter that stores users, accounts,.CreatePrismaAdapter- Creates a password-capable Auth.js adapter backed by Prisma.CreateResendMailer- Builds anAuthMailerimplementation backed by the Resend email API.GetCsrfToken- Fetches the CSRF token used by Auth.js form submissions.GetProviders- Lists OAuth, Email, and custom providers configured in Auth.js at runtime.GetRequestPayload- Parses the Robo request body once and exposes a reusable payload helper.GetServerSession- Retrieves the active Auth.js Session using the configured runtime.GetSession- Retrieves the current Auth.js session object, if one exists.GetSessions- Lists all sessions stored on this device, including expired ones.GetToken- Extracts (and optionally decodes) the Auth.js session token.HashPassword- Generates a PHC-formatted Argon2id hash string for a plaintext password.ListPrismaUserIds- Retrieves a paginated list of Auth.js user IDs using Prisma.ListPrismaUsers- Retrieves paginated AdapterUser records via Prisma.ListUserIds- Retrieves a paginated list of user IDs from the Flashcore user index.ListUsers- Retrieves paginated AdapterUser records by loading IDs from.NeedsRehash- Determines whether a stored Argon2id hash needs to be regenerated.NormalizeAuthOptions- Parses plugin configuration, applies defaults, and returns an Auth.js-ready option set.RemoveSession- Removes a session from the device stack and deletes the server-side session.SignInSignOutSignUp- Initiates the sign-up flow for the Email/Password provider.SwitchSession- Switches the active session to the given user.VerifyPasswordHash- Validates a password against a stored Argon2id hash.
Variables
AuthLogger- Namespaced logger for all@robojs/authruntime output.AuthPluginOptionsSchema- Zod schema enforcing the structure of@robojs/authplugin configuration.Auth_routes- Robo-authenticated routes mounted under the configuredbasePath.Default_base_path- Default route prefix used by the Auth plugin REST handlers.
