Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Native/ .NET Core Bundle - user.roles is undefined on successful login #95

Open
mwoodsmall opened this issue Nov 23, 2020 · 1 comment

Comments

@mwoodsmall
Copy link

After successfully logging in, the user object returned is missing the roles attribute.

This is causing this line to throw an error in the react native app: const isAdmin: boolean = user.roles.findIndex(role => role === 'admin') !== -1; (sign-in.service.ts)

@mwoodsmall
Copy link
Author

It looks like the problem is that in UserService.cs the AutoMapper isn't smart enough to map UserRoles from the UserEntity to the UserDTO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant