How to use the @okta/okta-auth-js function in @okta/okta-auth-js

To help you get started, we’ve selected a few @okta/okta-auth-js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github okta / okta-auth-js / test / app / src / testApp.js View on Github external
.then(() => {
        this.oktaAuth = this.oktaAuth || new OktaAuth(this.config); // can throw
        this.oktaAuth.tokenManager.on('error', this._onTokenError.bind(this));
      });
  },
github Robinyo / serendipity / projects / auth-okta / src / lib / services / auth / auth.service.ts View on Github external
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;
github okta / okta-auth-js / test / karma / spec / renewToken.js View on Github external
function bootstrap(config) {
    config = Object.assign({}, DEFAULT_CONFIG, config);
    sdk = new OktaAuth(config);
    sdk.tokenManager.clear();
    return Promise.resolve();
  }
github transmute-industries / transmute / packages / transmute-dashboard / src / components / Auth / Login / LoginForm.js View on Github external
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);
  }

@okta/okta-auth-js

The Okta Auth SDK

Apache-2.0
Latest version published 1 month ago

Package Health Score

80 / 100
Full package analysis