Configuration

Global Flags

The library includes global flags to control internal behavior, primarily for debugging.

import { setFlag } from '@openid/appauth';

// Enable or disable console logging (default: true)
setFlag('IS_LOG', true);

// Enable internal profiling (default: false)
setFlag('IS_PROFILE', true);

Service Configuration

Instead of manual discovery, you can define the service configuration manually:

import { AuthorizationServiceConfiguration } from '@openid/appauth';

const config = new AuthorizationServiceConfiguration({
  authorization_endpoint: 'https://example.com/oauth/authorize',
  token_endpoint: 'https://example.com/oauth/token',
  revocation_endpoint: 'https://example.com/oauth/revoke',
  userinfo_endpoint: 'https://example.com/oauth/userinfo',
  end_session_endpoint: 'https://example.com/oauth/logout'
});