IUserManager.AddLogin Method
Links an external (upstream) identity to a local user, so the user can later be found with FindByLogin.
Remarks
If the same external identity is already linked to the user, the call has no effect. Only the provider name and key are stored; the provider's display metadata is resolved from TSphinxConfig.ExternalProviders when needed.
An external identity maps to a single local user. If it is already linked to a different user, an ESphinxErrorException with the LoginAlreadyAssociated error code is raised; use RemoveLogin to unlink it from the other user first.
Syntax
Unit: Sphinx.UserManager
procedure IUserManager.AddLogin(User: TUser; const LoginProvider: string; const ProviderKey: string); virtual; abstract;
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| User | TUser | The local user to link the external identity to. |
|
| 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). |