LogoRobo.js
Packages@robojs/auth

assertPasswordAdapter()

Function: assertPasswordAdapter()

function assertPasswordAdapter(adapter): asserts adapter is PasswordAdapter

Validates that a supplied Auth.js adapter implements password helper methods.

Parameters

ParameterTypeDescription
adapterundefined | AdapterAdapter instance provided by the user or plugin configuration.

Returns

asserts adapter is PasswordAdapter

Throws

When required password helper functions are missing.

Example

assertPasswordAdapter(createFlashcoreAdapter({ secret }))

On this page