keycloak-angular
keycloak-angular copied to clipboard
Using `assets/` instead of `/assets` in examples
Hey! Maybe using assets/
instead of /assets
in examples with bearerExcludedUrls
like below can cover more use cases because request URL can start with assets
without leading /
like this example assets/example.file
and will not be excluded from adding bearer process. What do you think about this?
await keycloak.init({
config: {
url: 'http://localhost:8080',
realm: 'your-realm',
clientId: 'your-client-id'
},
initOptions: {
onLoad: 'check-sso',
silentCheckSsoRedirectUri:
window.location.origin + '/assets/silent-check-sso.html'
},
bearerExcludedUrls: ['assets/', '/clients/public'],
shouldUpdateToken: (request) => {
return !request.headers.get('token-update') === 'false';
}
});
Diff
await keycloak.init({
config: {
url: 'http://localhost:8080',
realm: 'your-realm',
clientId: 'your-client-id'
},
initOptions: {
onLoad: 'check-sso',
silentCheckSsoRedirectUri:
window.location.origin + '/assets/silent-check-sso.html'
},
- bearerExcludedUrls: ['/assets', '/clients/public'],
+ bearerExcludedUrls: ['assets/', '/clients/public'],
shouldUpdateToken: (request) => {
return !request.headers.get('token-update') === 'false';
}
});