Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.then(() => {
this.oktaAuth = this.oktaAuth || new OktaAuth(this.config); // can throw
this.oktaAuth.tokenManager.on('error', this._onTokenError.bind(this));
});
},
constructor(@Inject(OktaConfigService) private config: OktaConfig,
private router: Router,
private logger: LoggerService) {
super();
this.logger.info('OktaAuthService: constructor()');
this.logger.info('OktaAuthService this.config.okta: ' + JSON.stringify(this.config.okta));
// this.auth = new OktaAuth(this.config.okta);
this.auth = new OktaAuth({
issuer: this.config.okta.issuer,
clientId: this.config.okta.clientId,
redirectUri: this.config.okta.redirectUri,
grantType: this.config.okta.grantType
});
this._isAuthenticated().then(authstate => {
this.authState$.next(authstate);
this.authState$.subscribe((authenticated: boolean) => {
this.logger.info('OktaAuthService isAuthenticated(): ' + this.authenticated);
this.authenticated = authenticated;
function bootstrap(config) {
config = Object.assign({}, DEFAULT_CONFIG, config);
sdk = new OktaAuth(config);
sdk.tokenManager.clear();
return Promise.resolve();
}
constructor(props) {
super(props);
this.state = {
error: null,
email: '',
password: ''
};
this.oktaAuth = new OktaAuth({ url: props.baseUrl });
this.handleSubmit = this.handleSubmit.bind(this);
this.handleChange = this.handleChange.bind(this);
}