Skip to main content

createRefreshToken

talawa-apiDocs


talawa-api / utilities/auth / createRefreshToken

Function: createRefreshToken()

> createRefreshToken(user, appUserProfile): string

Creates a refresh token (JWT) for a user that expires in 30 days. The token contains user data and is signed with the refresh token secret.

Parameters

user: InterfaceUser

User data

appUserProfile: InterfaceAppUserProfile

Application user profile data

Returns

string

JSON Web Token string payload

Defined in

src/utilities/auth.ts:60