IUserManager.FindByLogin Method
Retrieves the local user linked to the given external (upstream) identity, or nil if no link exists.
Remarks
This is the recommended way to reconcile an external sign-in with a local account, since the provider key (subject) is stable, unlike the e-mail address. Use AddLogin to create the link on the first sign-in. The lookup honors the active multitenant filter, so a link is only resolved for a user visible in the current tenant.
Syntax
Unit: Sphinx.UserManager
function IUserManager.FindByLogin(const LoginProvider: string; const ProviderKey: string): TUser; virtual; abstract;
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| const | LoginProvider | string | The name of the external provider that authenticated the user. |
| const | ProviderKey | string | The stable identifier of the user at the external provider (the sub claim). |
Returns
The local user linked to the external identity, or nil if no link exists.