TsgcHTTP_OAuth2_Client › Properties › LocalServerOptions
Configuration for the local HTTP listener that receives the authorization-code redirect from the browser.
property LocalServerOptions: TsgcHTTPOAuth_LocalServerOptions read FLocalServerOptions write SetLocalServerOptions;
IP=127.0.0.1, Port=8080, SSL=False
When the client starts an auth2Code or auth2CodePKCE flow it launches a transparent HTTP listener to capture the redirect_uri callback issued by the authorization server. LocalServerOptions exposes the parameters of that listener:
127.0.0.1).8080). For auth2CodePKCE on desktop/native apps, set to 0 to pick a random free port.http://localhost:8080/oauth/).The listener is only active while the component is waiting for the redirect; it is not used by auth2ClientCredentials, auth2ResourceOwnerPassword or auth2DeviceCode.
oOAuth2 := TsgcHTTP_OAuth2_Client.Create(nil);
oOAuth2.LocalServerOptions.IP := '127.0.0.1';
oOAuth2.LocalServerOptions.Port := 8080;
oOAuth2.LocalServerOptions.RedirectURL := 'http://localhost:8080/oauth/';