#`saveToJWT: true` + refresh token not refreshing values if changed through admin interface

4 messages · Page 1 of 1 (latest)

paper pasture
#

Hey 👋

1). An auth collection has a field with saveToJWT: true
2). A user logs in and correctly has the value saved along the JWT in the user object
3). Through Payload’s interface, we change the value for that user’s field
4). On the front-end, the user triggers a /api/[collection-slug]/refresh-token but does not get the updated value in the user object.

Is this intended behavior?

#

Worth mentioning, I'm doing so through the REST API endpoint. Maybe a GraphQL mutation will react differently?

#

Correction, GraphQL’s mutation does not seem to return "saveToJWT" fields

round flume
#

Hi @paper pasture do you still need help here?