Lock getUserInfo() returns empty result

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.

2 Likes

Hey @grom !

When it comes to getting a new token before the old one is really expired, the answer is: refresh token. You can read more info about it here:

Let me know if that helps!

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