0
Sergei.Gorlovetsky created
- ABP Framework version: v8.3.2
- UI Type: Angular
- Database System: EF Core (PostgreSQL)
- Tiered (for MVC) or Auth Server Separated (for Angular): yes
- Exception message and full stack trace: While using angular-oauth2-oidc package in angular app. Whenever I try to login, It appears to be removing the access_token and id_token from localStorage.
- Steps to reproduce the issue: 1- Use IdentityServer for authentication. 2- Use angular-oauth2-oidc package in angular app. 3- Inject OAuthService in home.component.ts 4 - Try to debug the this.oAuthService.hasValidAccessToken() method, access_token and id_token firstly stored then somehow removed from localStorage.
3 Answer(s)
-
0
could you share a test project? I will check it.shiwei.liang@volosoft.com
-
0
You can try
ClientelePortalHttpApiHostModule
public override void ConfigureServices(ServiceConfigurationContext context) { ..... MapClaims(); } private void MapClaims() { AbpClaimTypes.UserName = ClaimTypes.Name; AbpClaimTypes.Name = ClaimTypes.GivenName; AbpClaimTypes.SurName = ClaimTypes.Surname; AbpClaimTypes.UserId = ClaimTypes.NameIdentifier; AbpClaimTypes.Role = ClaimTypes.Role; AbpClaimTypes.Email = ClaimTypes.Email; }
Update oAuthConfig
const oAuthConfig = { issuer: identityServerUrl, redirectUri: baseUrl, clientId: 'ClientelePortal_App', skipIssuerCheck: true, responseType: 'code', scope: 'offline_access ClientelePortal' };
-
0
Hi Liangshiwei, Thank you for the suggestion. We've applied it and it worked. Have a great weekend :)