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

[Question]: ResponseType code id_token token + implicitFlow in angular-auth-oidc-client": "^15.0.1" #1897

Open
gauravshri-IBM opened this issue Feb 5, 2024 · 2 comments
Labels

Comments

@gauravshri-IBM
Copy link

When use responseType: 'code id_token token' my aplication not redirecting me to login page, it says invalid responseType check config.

where as with responseType: 'id_token token' able to login and post login its not redirecting me to correct route page

Error in Console
Error: authorizedCallback, token(s) validation failed, resetting. Hash:

correct url post login
https://localhost:4200/lingwyztic/dashboard

presently going to incorrect url
https://localhost:4200/lingwyztic/unauthorized

does 15.0.1 supports implicitFlow

@RAMKI2
Copy link

RAMKI2 commented Mar 4, 2024

could you please share your configurations? That helps more with the question

@gauravshri-IBM
Copy link
Author

when i add code as well in response type then it says incorrect mapping so i am trying with id_token token, but here issue i have is my url with accestoken is keep on refreshing never settled kind of... Any help is appreciated Thanks.

const initializeAppFactory = (configService: ConfigurationService) => {
const config$ = configService.getBaseConfig().pipe(
map((customConfig: BaseConfig) => {
console.log('Loaded custom configuration:', customConfig);
const oidcConfig = {
authority: customConfig.MID_issuer,
loginUrl: customConfig.MID_loginUrl,
tokenEndpoint: customConfig.MID_tokenEndpoint,
userinfoEndpoint: customConfig.MID_userinfoEndpoint,
clientId: customConfig.MID_clientId,
redirectUrl: window.location.origin + '/arcistic/dashboard',
postLogoutRedirectUri: window.location.origin,
scope: 'openid profile email voucher offline_access',
responseType: 'id_token token',
silentRenew: true,
renewTimeBeforeTokenExpiresInSeconds: 30,
ignoreNonceAfterRefresh: true,
// startCheckSession: true,
silentRenewUrl: ${window.location.origin}/arcistic/silent-renew.html,
logLevel: LogLevel.Debug,
}
console.log('OIDC Configuration:', oidcConfig);
return oidcConfig;
})
);
return new StsConfigHttpLoader(config$);
};

Silent-renew html



<title>silent-renew</title> <script> window.onload = function () { /* The parent window hosts the Angular application */ var parent = window.parent; /* Send the id_token information to the oidc message handler */ var event = new CustomEvent('oidc-silent-renew-message', { detail: window.location.hash.substr(1), }); parent.dispatchEvent(event); }; </script>

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

No branches or pull requests

2 participants