Developing a Secure API with NestJS

Hi

using the code from the BASIC API Auth example
I am not clear on how to get the sub and role from auth

import { auth, InvalidTokenError, UnauthorizedError } from 'express-oauth2-jwt-bearer';
const validateAccessToken = promisify(auth())

Thanks

Chris

1 Like