new Server(db, sendEmail)
Initialize a user login server.
Parameters:
Name |
Type |
Description |
db |
object
|
A database instance that stores the login flows.
Properties
Name |
Type |
Description |
fetchData |
function
|
To fetch a flow from the database. |
setData |
function
|
To add/update a flow in the database. |
|
sendEmail |
function
|
A function that will be called to send emails. |
- Source:
Methods
createFlow(params, callback)
Initiate a user login flow. To be called when rendering a user's login UI.
Parameters:
Name |
Type |
Description |
params |
object
|
A database instance that stores the login flows.
Properties
Name |
Type |
Description |
fetchData |
function
|
To fetch a flow from the database. |
setData |
function
|
To add/update a flow in the database. |
|
callback |
function
|
A function that will be called to send emails. |
- Source: