Class ExternalSignInAutoLinkOptions
Options used to configure auto-linking external OAuth providers
Inheritance
Namespace: Umbraco.Cms.Web.BackOffice.Security
Assembly: Umbraco.Web.BackOffice.dll
Syntax
public class ExternalSignInAutoLinkOptions
Constructors
View SourceExternalSignInAutoLinkOptions(Boolean, String[], String, Boolean)
Initializes a new instance of the ExternalSignInAutoLinkOptions class.
Declaration
public ExternalSignInAutoLinkOptions(bool autoLinkExternalAccount = false, string[] defaultUserGroups = null, string defaultCulture = null, bool allowManualLinking = true)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | autoLinkExternalAccount | |
| System.String[] | defaultUserGroups | If null, the default will be the 'editor' group |
| System.String | defaultCulture | |
| System.Boolean | allowManualLinking |
Properties
View SourceAllowManualLinking
By default this is true which allows the user to manually link and unlink the external provider, if set to false the back office user will not see and cannot perform manual linking or unlinking of the external provider.
Declaration
public bool AllowManualLinking { get; protected set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
AutoLinkExternalAccount
Gets a value indicating whether flag indicating if logging in with the external provider should auto-link/create a local user
Declaration
public bool AutoLinkExternalAccount { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
DefaultUserGroups
The default user groups to assign to the created local user linked
Declaration
public string[] DefaultUserGroups { get; }
Property Value
| Type | Description |
|---|---|
| System.String[] |
OnAutoLinking
A callback executed during account auto-linking and before the user is persisted
Declaration
[IgnoreDataMember]
public Action<BackOfficeIdentityUser, ExternalLoginInfo>? OnAutoLinking { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<Action<BackOfficeIdentityUser, Microsoft.AspNetCore.Identity.ExternalLoginInfo>> |
OnExternalLogin
A callback executed during every time a user authenticates using an external login. returns a boolean indicating if sign in should continue or not.
Declaration
[IgnoreDataMember]
public Func<BackOfficeIdentityUser, ExternalLoginInfo, bool>? OnExternalLogin { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<Func<BackOfficeIdentityUser, Microsoft.AspNetCore.Identity.ExternalLoginInfo, System.Boolean>> |
Methods
View SourceGetUserAutoLinkCulture(GlobalSettings)
The default Culture to use for auto-linking users
Declaration
public string GetUserAutoLinkCulture(GlobalSettings globalSettings)
Parameters
| Type | Name | Description |
|---|---|---|
| GlobalSettings | globalSettings |
Returns
| Type | Description |
|---|---|
| System.String |