Base solution for your next web application

Activities of "TSG"

Hi @ismcagdas,

Thanks for the suggestion. I have mention getting the role from the access token because I can see the roles on the token claims

{ "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier": "2", "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name": "admin", "AspNet.Identity.SecurityStamp": "ad2a1564-1e74-03e4-95ed-39ee2fc7279b", "http://schemas.microsoft.com/ws/2008/06/identity/claims/role": "Admin", "http://www.aspnetboilerplate.com/identity/claims/tenantId": "1", "sub": "2", "jti": "6894167b-4e59-4f5f-b289-dea08f80673b", "iat": 1559923693, "token_validity_key": "a9effec1-16d0-4cb7-b172-3524e2ed5ae9", "user_identifier": "2@1", "nbf": 1559923693, "exp": 1560010093, "iss": "TSG", "aud": "TSG" }

Hi, I would like to redirect users to specific routes after login based on their roles.

I'm thinking about decoding the access token to get the user role and then redirect based on the role. /src/account/login/login.service.ts - ln194 Is there a way of getting the role from the access token?

Would you suggest another approach to achieve this?

Thanks, Rui

Hi @christianw, @ismcagdas

I would like to share my solution architecture structure with you and perhaps have some feedback. Let's take the example of an ERP system that has Sales and Purchase modules.

I would create two projects per module - one for the applications services and another one for data related logic (EF Core).

Any classes that need to be shared across Sales and Purchases will be created on the Common project.

I would make minimal changes and avoid adding new classes to the original AspNetZero Projects. This will allow me to easily upgrade to a newer version of AspNetZero.

Any feedback would be appreciated.

Thanks, Rui

Showing 1 to 3 of 3 entries