Auth0 Home Blog Docs

Lock getUserInfo() returns empty result


#1

I’m using Lock for Web v11 in my React app. It works good. But unfortunately I can’t get user information in some cases.
Description:

  1. I call lock.checkSession() for existing user to get a new Token. (Old token is still valid, but I hope it is not a problem)
  2. Right after (1) I call lock.getUserInfo(newAccessToken, …) where newAccessToken is a result of (1)
  3. The result of getUserInfo() is {} (empty object). But if I set old access token as a parameter, sometimes I receive valid user information.

Can anyone help me with advice? Is it possible to get a new Token before the old one is really expired?

Thanks.