Function: assertPasswordAdapter()
function assertPasswordAdapter(adapter): asserts adapter is PasswordAdapter
Validates that a supplied Auth.js adapter implements password helper methods.
Parameters
Parameter | Type | Description |
---|---|---|
adapter | any | Adapter 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 }))