Skip to main content

components/password/test

For AI agents: see llms.txt for the complete documentation index. Markdown versions are available by adding .md to a page URL or requesting Accept: text/markdown.

Variables​

default​

default: object;

Type Declaration​

modules​
modules: Record<string, () => Promise<unknown>>;
registerPassword​
registerPassword: (t, name) => void;

Register the password component with a convex-test instance.

The component throttles verifyPassword through a nested rate-limiter, so we register that under <name>/rateLimiter too — mirroring how it's mounted when the app app.uses the convex.config of the component.

Parameters​
ParameterTypeDefault valueDescription
tTestConvex<SchemaDefinition<GenericSchema, boolean>>undefinedThe test convex instance, e.g. from calling convexTest.
namestring"authPassword"The name of the component, as registered in convex.config.ts.
Returns​

void

schema​
schema: SchemaDefinition<
{
passwords: TableDefinition<
VObject<
{
passwordHashPHC: string;
userId: string;
},
{
passwordHashPHC: VString<string, "required">;
userId: VString<string, "required">;
},
"required",
"userId" | "passwordHashPHC"
>,
{
by_userId: ["userId", "_creationTime"];
},
{},
{}
>;
},
true
>;

Functions​

registerPassword()​

function registerPassword(t, name?): void;

Register the password component with a convex-test instance.

The component throttles verifyPassword through a nested rate-limiter, so we register that under <name>/rateLimiter too — mirroring how it's mounted when the app app.uses the convex.config of the component.

Parameters​

ParameterTypeDefault valueDescription
tTestConvex<SchemaDefinition<GenericSchema, boolean>>undefinedThe test convex instance, e.g. from calling convexTest.
namestring"authPassword"The name of the component, as registered in convex.config.ts.

Returns​

void