TsgcHTTP_OAuth2_ServerMethods › ClearProviders

ClearProviders Method

Removes every external identity provider registered in the server federation list.

Syntax

procedure ClearProviders;

Remarks

Empties the internal Providers collection in one call. After invoking this method, no external identity provider (Google, GitHub, Microsoft, etc.) is available for federated sign-in until RegisterProvider is called again. Typically used when reloading server configuration at runtime.

Example

// Drop all external providers and reload from configuration
OAuth2.ClearProviders;
OAuth2.RegisterProvider('Google', vClientId, vClientSecret,
  'https://accounts.google.com/o/oauth2/v2/auth',
  'https://oauth2.googleapis.com/token',
  'openid email profile',
  'https://www.googleapis.com/oauth2/v3/userinfo',
  'https://www.esegece.com/sgc/oauth2/callback');

Back to Methods