The default user metadata includes id but without the Warden scope, if you have multiple user types, for example: User and AdminUser, it wouldn't be possible to know who's who when removing the default fields which are PII.
Design
Simple approach as Warden scope is already used to determine the user object in this case, so the objective is to just include the scope value as another user field.
Goal
Closes #777
The default user metadata includes
id
but without the Warden scope, if you have multiple user types, for example:User
andAdminUser
, it wouldn't be possible to know who's who when removing the default fields which are PII.Design
Simple approach as Warden scope is already used to determine the user object in this case, so the objective is to just include the scope value as another user field.
Changeset
Just adds a
warden_scope
key to the user object.Testing