Netlify-identity-widget currentUser object not refreshing after lambda update

Following this guide: https://github.com/netlify/gotrue-js I am able to update a user through admin methods in a lambda function. However, I am not able to see those updates immediately on my site through the netlify-identity-widget’s currentUser object (https://github.com/netlify/netlify-identity-widget) even after refreshing the page. I am forced to log the users out and back in to see the changes. Is there a way I can trigger currentUser to update/refresh manually? Thank you!

Hi @vdadfar,

The save() operation returns the updated user object that you can use in your app. However the currentUser() is not updated by this operation, but it should update the next time you refresh the jwt using .jwt() (https://github.com/netlify/gotrue-js#get-a-jwt-token). Note that if your current JWT isn’t expired then you have to pass a truthy value into the jwt() call to force it get you a new token. Or you can log out then log back in again. Let me know if this helps!