talawa-api / Exports / utilities/auth
Module: utilities/auth
Table of contents
Interfaces
Functions
Functions
createAccessToken
▸ createAccessToken(user
, appUserProfile
): string
This function creates a json web token which expires in 15 minutes. It signs the given payload(user data) into a JSON Web Token string payload.
Parameters
Name | Type | Description |
---|---|---|
user | InterfaceUser | User data |
appUserProfile | InterfaceAppUserProfile | - |
Returns
string
JSON Web Token string payload
Defined in
createRefreshToken
▸ createRefreshToken(user
, appUserProfile
): string
Parameters
Name | Type |
---|---|
user | InterfaceUser |
appUserProfile | InterfaceAppUserProfile |
Returns
string
Defined in
revokeRefreshToken
▸ revokeRefreshToken(userId
): Promise
<void
>
Parameters
Name | Type |
---|---|
userId | string |
Returns
Promise
<void
>