Skip to main content

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

NameTypeDescription
userInterfaceUserUser data
appUserProfileInterfaceAppUserProfile-

Returns

string

JSON Web Token string payload

Defined in

src/utilities/auth.ts:19


createRefreshToken

createRefreshToken(user, appUserProfile): string

Parameters

NameType
userInterfaceUser
appUserProfileInterfaceAppUserProfile

Returns

string

Defined in

src/utilities/auth.ts:38


revokeRefreshToken

revokeRefreshToken(userId): Promise<void>

Parameters

NameType
userIdstring

Returns

Promise<void>

Defined in

src/utilities/auth.ts:57