How to get userinfo from expressjs backend server

Hi,
I have an app calling my expressJs server where all the auth0 token verification code is.
I am pretty much looking and trying to use the concept defined.
https://github.com/auth0-samples/auth0-angular-samples/blob/master/03-Calling-an-API/server.js

Though the verification succeeds, my next step is to get the user profile info. This is using the access_token and the opaque way of verifying.
I can see on using the following code

app.get('/api/private', checkJwt, checkScopes, function(req, res) { res.json({ message: req.user }); });

req.user prints out the decoded token but it is lacking the userinfo.
How do I know the userinfo at the backend. I would like to store a few properties for a user in the backend and make it available when user logins. What’s the best way?

Thanks,
Sharad

Hi @er.sharad.kapoor,

You can access the user information in exchange for the access_token using the /getUserInfo endpoint. Please view this for more info.

Additionality, you can get more information on user management here

Hope this helps!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.