Okay so prior to 0.11, your definition of
api/src/lib/auth.js was only used on the api side. On the web side, in the case of Netlify Identity,
currentUser was what was returned by the
Now, post 0.11 what’s returned by
getCurrentUser is used on both the api and web side, and
userMetadata falls back to the contents of the JWT (which is returned by default in
So in 0.11+, without making any changes to auth.js
currentUser should return the content of the JWT on the web side, right @peterp? Maybe if the user isn’t logged in at all it returns null?