description: Should be used to ID a user in your system.
Adding JWT Payload
withJWTPayload(Map<String, Object> jwtPayload)
jwtPayload
description: This information is stored in the JWT sent to the frontend, so it should not contain any sensitive information. The values in the map can be any of the primitive types, an Object[] or Map<String, Object>.
Adding Session Data
withSessionData(Map<String, Object> sessionData)
sessionData
description: This information is stored only in your database, so it can contain sensitive information. The values in the map can be any of the primitive types, an Object[] or Map<String, Object>.
Returns
Session on successful creation of a session. To know more about the Session object, click here