tryLogin - without discovery document - failing
See original GitHub issueHello,
I try to implement the oidc without discovery document therefor i use the tryLogin - method:
private configureOIDC() { this.oauthService.configure(OIDCconfig); this.oauthService.tokenValidationHandler = new JwksValidationHandler(); this.oauthService.tryLogin(); }
This is my OIDC config:
export const OIDCconfig: AuthConfig = { issuer: 'https://xxxxxx.com/xxxx', redirectUri: 'https://xxxxxx.com/login', clientId: 'myclientID', scope: 'openid', responseType: 'token' }
When i call the tryLogin method nothing happens.
Am I missing something?
According to the docs this should be enough:
`
this.oauthService.loginUrl = “https://steyer-identity-server.azurewebsites.net/identity/connect/authorize”; //Id-Provider?
// URL of the SPA to redirect the user to after login
this.oauthService.redirectUri = window.location.origin + "/index.html";
// The SPA's id. Register SPA with this id at the auth-server
this.oauthService.clientId = "spa-demo";
// set the scope for the permissions the client should request
this.oauthService.scope = "openid profile email voucher";
// Use setStorage to use sessionStorage or another implementation of the TS-type Storage
// instead of localStorage
this.oauthService.setStorage(sessionStorage);
// To also enable single-sign-out set the url for your auth-server's logout-endpoint here
this.oauthService.logoutUrl = "https://steyer-identity-server.azurewebsites.net/identity/connect/endsession";
// This method just tries to parse the token(s) within the url when
// the auth-server redirects the user back to the web-app
// It doesn't send the user the the login page
this.oauthService.tryLogin();
`
But obviously i get an error with this example code:
“Error in initImplicitFlow TypeError: Cannot read property ‘responseType’ of null”
Any help would be very appreciated.
Issue Analytics
- State:
- Created 4 years ago
- Comments:11
Top GitHub Comments
Try setting
oidc: false
and theloginUrl
in the auth config.Is there any working example for implicit flow without discovery documents?
The example https://github.com/manfredsteyer/angular-oauth2-oidc/blob/master/docs-src/implicit-flow-config-no-discovery.md obviously does not work.