Comments (9)
from angular-auth-oidc-client.
thanks for this.
from angular-auth-oidc-client.
Experiencing the same problem. Has this been fixed? Authorize firing before discovery endpoint loaded
from angular-auth-oidc-client.
@craigpayne no, plan to do this as soon as I have access to a PC, in 2 weeks
from angular-auth-oidc-client.
You could also subscribe to the onModuleSetup event before calling the authorize or authorizeCallback functions see the api docs for an example
from angular-auth-oidc-client.
@Silthus @craigpayne Is the following solution ok for you?
subscribe to the onModuleSetup event:
constructor(public oidcSecurityService: OidcSecurityService) {
this.oidcSecurityService.onModuleSetup.subscribe(() => { this.onModuleSetup(); });
}
handle the authorize callback using the event:
private onModuleSetup() {
if (window.location.hash) {
this.oidcSecurityService.authorizedCallback();
}
}
unsubscribe
ngOnDestroy(): void {
this.oidcSecurityService.onModuleSetup.unsubscribe();
}
from angular-auth-oidc-client.
from angular-auth-oidc-client.
just testing, this doesn't always work because the onModuleSetup event is sometimes before the component subscribes to it. Need to add a moduleSetup boolean check.
if (this.oidcSecurityService.moduleSetup) {
this.doCallbackLogicIfRequired();
} else {
this.oidcSecurityService.onModuleSetup.subscribe(() => {
this.doCallbackLogicIfRequired();
});
}
from angular-auth-oidc-client.
fixed in version 1.3.3
Example:
https://github.com/damienbod/angular-auth-oidc-sample-google-openid/blob/master/src/AngularClient/angularApp/app/app.component.ts
from angular-auth-oidc-client.
Related Issues (20)
- [Bug]: Logoff not working
- [Question]: how can i use triggerAuthorizationResultEvent HOT 1
- [Bug]: silent renew failed! Error: Error: authorizedCallback, token(s) validation failed, resetting. Hash HOT 2
- [Feature Request]: Add support for angular 18
- [Bug]: Fix Quality build standalone.js HOT 1
- SAML 2 for OAuth 2.0 Client Authentication and Authorization Grants
- [Question]: Do you have a register function ?
- [Bug]: Missing `EventTypes.CheckingAuthFinished` for state isAuthenticated: false
- what are the best practices for using cypress?
- [Question]: checking token validity before sending HTTP requests
- [Question]: Angular 18 Standalone sample app HOT 1
- [Question]: Is it possible to not validate the `code` parameters when requesting `authorize` (authorization endpoint) from the API?
- [Question]: How to build a `PartialRoutesGuard` without auto-login
- [Question]: Unable to find eagerLoadAuthWellKnownEndpoints in version 18.0.0
- [Bug]: Expected double-quoted property name in JSON at position 709 HOT 2
- [Bug]: AutoLoginPartialRoutesGuard is not trying to silentRenew if refresh token still valid HOT 1
- [Question]: How can I use urlHandler when using authorizeWithPopUp, is it supported in popup?
- [Question]: How can i use it with oidc-provider
- [Question]: Async provider loader with provideAuth HOT 3
- [Question]: Is there a handler for when the refresh token process returns id_token?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-auth-oidc-client.