How to use the @blackbaud/auth-client.BBContextProvider.ensureContext function in @blackbaud/auth-client

To help you get started, we’ve selected a few @blackbaud/auth-client 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 blackbaud / skyux-builder / runtime / bootstrapper.ts View on Github external
const params = new SkyAppRuntimeConfigParams(
            currentUrl,
            this.config.params!
          );

          const ensureContextArgs: BBContextArgs = {
            envId: params.get('envid'),
            envIdRequired: params.isRequired('envid'),
            leId: params.get('leid'),
            leIdRequired: params.isRequired('leid'),
            svcId: params.get('svcid'),
            svcIdRequired: params.isRequired('svcid'),
            url: currentUrl
          };

          return BBContextProvider.ensureContext(ensureContextArgs)
            .then((args) => {
              // The URL will remain the same if the required context is already present, in which
              // case there's no need to update the URL.
              if (args.url !== currentUrl) {
                history.replaceState(
                  {},
                  '',
                  args.url
                );
              }
            });
        });
    } else {

@blackbaud/auth-client

Provides methods for obtaining an authentication token from the Blackbaud authentication service.

MIT
Latest version published 7 months ago

Package Health Score

45 / 100
Full package analysis

Similar packages