-
Notifications
You must be signed in to change notification settings - Fork 267
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
Jp okta 468586 broadcast channel #1124
Conversation
lib/ServiceManager.ts
Outdated
this.elector = undefined; | ||
} | ||
|
||
private createService(name: string): ServiceInterface | undefined { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be able to remove undefined
from the type, as it throws instead of returning undefined
.
8c04d9d
to
f62a87d
Compare
|
||
In version `6.X`, the `autoRenew` configuration was set in `config.tokenManager`. To maintain backwards compatibility, this configuration is still respected but with a slight caveat. `tokenManager.autoRenew` configures 2 token auto renew strategies, `active` and `passive`. | ||
* `active` - Network requests are made in the background in an attempt to refresh tokens before they are truly expired to maintain a seamless UX. | ||
> :warning: this can cause an unintended side effect where the session never expires because it is constantly being refreshed (extended) before the actual expiration time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
private options: ServiceManagerOptions; | ||
private services: Map<string, ServiceInterface>; | ||
private channel?: BroadcastChannel; | ||
private elector?: LeaderElector; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should the elector logic belong to syncService
?
private sdk: OktaAuth; | ||
private options: ServiceManagerOptions; | ||
private services: Map<string, ServiceInterface>; | ||
private channel?: BroadcastChannel; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
private renewTimeQueue: Array<number>; | ||
private started = false; | ||
|
||
constructor(tokenManager: TokenManager, options: ServiceManagerOptions = {}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pass oktaAuth
in constructor, so both serviceManager and tokenManager can be available in each service class.
d7f308a
to
ca9c8dc
Compare
OKTA-468586 <<<Jenkins Check-In of Tested SHA: f1acdd4 for eng_productivity_ci_bot_okta@okta.com>>> Artifact: okta-auth-js Files changed count: 29 PR Link: "#1124"
No description provided.