TSphinxLogin.HandleCallback Method
Completes authentication when the application receives a custom URL scheme callback.
Remarks
Call this method from your platform URL-scheme handler (e.g. FMX TApplicationEvents.OnOpenURL, iOS AppDelegate openURL, Android onNewIntent) when the RedirectUri property is set to a custom URL scheme. On success, the tokens are saved and OnUserLoggedIn is fired on the main thread.
Syntax
Unit: Sphinx.Login
function TSphinxLogin.HandleCallback(const CallbackUrl: string): Boolean;
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| const | CallbackUrl | string | The full callback URL received from the OS, e.g. myapp://auth/callback?code=...&state=.... |
Returns
True if the URL was recognized as a valid authentication callback and tokens were obtained successfully; False otherwise (unrecognized URL, no pending login, or server error). Never raises an exception.