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

Jp okta 468586 broadcast channel #1124

Closed
wants to merge 14 commits into from

Conversation

jaredperreault-okta
Copy link
Contributor

No description provided.

this.elector = undefined;
}

private createService(name: string): ServiceInterface | undefined {
Copy link
Contributor

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.

@jaredperreault-okta jaredperreault-okta force-pushed the jp-OKTA-468586-broadcast-channel branch 2 times, most recently from 8c04d9d to f62a87d Compare March 2, 2022 15:38
@jaredperreault-okta jaredperreault-okta marked this pull request as ready for review March 2, 2022 16:22

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
Copy link
Contributor

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;
Copy link
Contributor

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;
Copy link
Contributor

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 = {}) {
Copy link
Contributor

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.

@jaredperreault-okta jaredperreault-okta force-pushed the jp-OKTA-468586-broadcast-channel branch from d7f308a to ca9c8dc Compare March 2, 2022 19:25
eng-prod-CI-bot-okta pushed a commit that referenced this pull request Mar 3, 2022
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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants