How to use @okta/okta-sdk-nodejs - 2 common examples

To help you get started, we’ve selected a few @okta/okta-sdk-nodejs 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 bitwarden / directory-connector / src / services / okta-directory.service.ts View on Github external
this.dirConfig = await this.configurationService.getDirectory<OktaConfiguration>(DirectoryType.Okta);
        if (this.dirConfig == null) {
            return;
        }

        this.syncConfig = await this.configurationService.getSync();
        if (this.syncConfig == null) {
            return;
        }

        if (this.dirConfig.orgUrl == null || this.dirConfig.token == null) {
            throw new Error(this.i18nService.t('dirConfigIncomplete'));
        }

        this.client = new okta.Client({
            orgUrl: this.dirConfig.orgUrl,
            token: this.dirConfig.token,
        });

        let users: UserEntry[];
        if (this.syncConfig.users) {
            users = await this.getUsers(force);
        }

        let groups: GroupEntry[];
        if (this.syncConfig.groups) {
            const setFilter = this.createCustomSet(this.syncConfig.groupFilter);
            groups = await this.getGroups(this.forceGroup(force, users), setFilter);
            users = this.filterUsersFromGroupsSet(users, groups, setFilter);
        }

@okta/okta-sdk-nodejs

Okta API wrapper for Node.js

Apache-2.0
Latest version published 6 months ago

Package Health Score

79 / 100
Full package analysis

Popular @okta/okta-sdk-nodejs functions

Popular JavaScript code snippets

Find secure code to use in your application or website