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
Describe the bug
Vue-Admin and many other administration applications tend to make use of a username to show welcome messagesor any other message that needs a kind of presentation to that individual.
In Vue-Admin there's currently a way to extract the current user, where a username or email can be found, though there's no way to get to know which is the field where this username will be extracted from.
We can notice the authentication system uses authFields:
There also this userField variable the authentication adapter will use to extract the user from successful responses:
constuserField='user'
To Reproduce
Steps to reproduce the behavior:
Make sure your backend responds the AUTH_LOGIN_REQUEST with a user without an email field.
Try to log in
The alert system should break because it assumes every extracted user has an email value. The snackbar text welcome has an empty string where the name should be located.
Expected behavior
The snackbar, and any other Vue-Admin component should not worry about the user response structure. Vue-Admin should let users define expected attribute fields of the user object in authentication responses
The text was updated successfully, but these errors were encountered:
Describe the bug
Vue-Admin and many other administration applications tend to make use of a username to show welcome messagesor any other message that needs a kind of presentation to that individual.
In Vue-Admin there's currently a way to extract the current user, where a username or email can be found, though there's no way to get to know which is the field where this username will be extracted from.
We can notice the authentication system uses
authFields
:There also this
userField
variable the authentication adapter will use to extract the user from successful responses:To Reproduce
Steps to reproduce the behavior:
AUTH_LOGIN_REQUEST
with a user without anemail
field.email
value. The snackbar text welcome has an empty string where the name should be located.Expected behavior
The snackbar, and any other Vue-Admin component should not worry about the user response structure. Vue-Admin should let users define expected attribute fields of the user object in authentication responses
The text was updated successfully, but these errors were encountered: