Page Contents

Home > @loopback/authentication > TokenService > verifyToken

TokenService.verifyToken() method

Verifies the validity of a token string and returns a user profile

Signature:

verifyToken(token: string): Promise<UserProfile>;

Parameters

Parameter Type Description
token string The token/secret which should be validated/verified.

Returns:

Promise<UserProfile>

The UserProfile which belongs to the given token.