hi
The OpenID Connect supports this; you can use code to add a JsonWebKey to your application. For the ASP.NET Core OIDC, you can refer to the Identity Server sample.
https://kevinchalet.com/2023/10/20/introducing-native-applications-per-client-token-lifetimes-and-client-assertions-support-in-openiddict-5-0-preview1/#Client-assertions
https://docs.duendesoftware.com/identityserver/tokens/client-authentication/#using-aspnet-core https://github.com/DuendeSoftware/samples/blob/9ce9dd71b07d7c63684d4d103e4fb683757fd8a9/IdentityServer/v7/Basics/MvcJarJwt/src/AssertionService.cs#L15
Thanks.
hi
You can also change your api url in Angular instead of adding a new one xsrfAbsoluteUrlInterceptor
export const environment = {
production: true,
application: {
baseUrl,
name: 'RTA HR Training',
},
localization: {
defaultResourceName: 'AbpUi',
},
oAuthConfig,
apis: {
default: {
url: "/HRBack",
rootNamespace: 'TNAPlanner',
},
AbpAccountPublic: {
url: "/HRBack",
rootNamespace: 'AbpAccountPublic',
},
},
remoteEnv: {
url: 'dynamic-env.json',
mergeStrategy: 'deepmerge'
}
} as Environment;
Thanks.
ok. Refunded.
hi
Can you check this?
https://abp.io/support/questions/817/How-to-delete-current-license-login-session#answer-4cbc8f13-c7f3-84fa-7fc8-39fa2688df13
Thanks
hi
Yes, the error no longer exists.
Thanks.
hi
You can override the default OpenLdapManager/LdapManager to get multiple configurations for a single tenant.
Thanks.
hi
Can you try adding a custom functional interceptor that reads the XSRF-TOKEN cookie and adds the RequestVerificationToken header to mutating requests? Then register it in app.config.ts?
This ensures that the RequestVerificationToken header is always included in POST/PUT/DELETE requests, regardless of whether the URL is absolute or relative.
// src/app/shared/xsrf-absolute-url.interceptor.ts
import { HttpInterceptorFn } from '@angular/common/http';
import { inject } from '@angular/core';
import { DOCUMENT } from '@angular/common';
export const xsrfAbsoluteUrlInterceptor: HttpInterceptorFn = (req, next) => {
if (req.method === 'GET' || req.method === 'HEAD') {
return next(req);
}
if (req.headers.has('RequestVerificationToken')) {
return next(req);
}
const doc = inject(DOCUMENT);
const cookie = doc.cookie
.split(';')
.map(c => c.trim())
.find(c => c.startsWith('XSRF-TOKEN='));
const token = cookie ? decodeURIComponent(cookie.substring('XSRF-TOKEN='.length)) : null;
if (token) {
req = req.clone({ headers: req.headers.set('RequestVerificationToken', token) });
}
return next(req);
};
import { provideHttpClient, withInterceptors } from '@angular/common/http';
import { xsrfAbsoluteUrlInterceptor } from './shared/xsrf-absolute-url.interceptor';
// inside providers array:
provideHttpClient(withInterceptors([xsrfAbsoluteUrlInterceptor])),
Thanks.
Hi
Can you share your Angular app source code? maybe you disabled the withNoXsrfProtection
Thanks.
hi
I will check it again.
Thanks.