Packages@robojs/auth
assertPasswordAdapter()
Function: assertPasswordAdapter()
function assertPasswordAdapter(adapter): asserts adapter is PasswordAdapterValidates that a supplied Auth.js adapter implements password helper methods.
Parameters
| Parameter | Type | Description |
|---|---|---|
adapter | undefined | Adapter | 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 }))