You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When users get the user in the pages that have authRequired: true or by using the useAuth hook they get the AuthUser object. This user object contains only the fields on the User entity and auth specific identities object.
I think we could provide a hook in Wasp that would allow users to customise the user object: adding new fields (like their role) or removing some sensitive fields (removing hasPaid).
We should be careful not to allow users to break Wasp's auth system while still giving them flexibility. The AuthUser type should reflect the new fields as well.
When users get the
user
in the pages that haveauthRequired: true
or by using theuseAuth
hook they get theAuthUser
object. This user object contains only the fields on theUser
entity and auth specificidentities
object.I think we could provide a hook in Wasp that would allow users to customise the
user
object: adding new fields (like theirrole
) or removing some sensitive fields (removinghasPaid
).We should be careful not to allow users to break Wasp's auth system while still giving them flexibility. The
AuthUser
type should reflect the new fields as well.Related: https://ptb.discord.com/channels/686873244791210014/1340391750665109637/1341865419333570633
The text was updated successfully, but these errors were encountered: