Skip to content

Instantly share code, notes, and snippets.

@BasLijten
Created October 22, 2017 02:15
Show Gist options
  • Save BasLijten/c04788bb30a31178e4a5cdd1ae19188d to your computer and use it in GitHub Desktop.
Save BasLijten/c04788bb30a31178e4a5cdd1ae19188d to your computer and use it in GitHub Desktop.
<identityProvider id="Auth0" type="Sitecore.Owin.Authentication.Configuration.DefaultIdentityProvider, Sitecore.Owin.Authentication">
<param desc="name">$(id)</param>
<param desc="domainManager" type="Sitecore.Abstractions.BaseDomainManager" resolve="true" />
<!--This text will be showed for button-->
<caption>Log in with Auth0 - Created by Bas</caption>
<icon>/sitecore/shell/themes/standard/Images/24x24/bas.png</icon>
<!--Domain name which will be added when create a user-->
<domain>sitecore</domain>
<!--list of identity transfromations which are applied to the provider when a user signin-->
<transformations hint="list:AddTransformation">
<!--SetIdpClaim transformation-->
<transformation name="set idp claim" ref="federatedAuthentication/sharedTransformations/setIdpClaim" />
<!--transformation for Auth0 provider-->
<transformation name="devRole" type="Sitecore.Owin.Authentication.Services.DefaultTransformation, Sitecore.Owin.Authentication">
<sources hint="raw:AddSource">
<claim name="idp" value="Auth0" />
</sources>
<targets hint="raw:AddTarget">
<claim name="http://schemas.microsoft.com/ws/2008/06/identity/claims/role" value="Sitecore\Developer" />
</targets>
<keepSource>true</keepSource>
</transformation>
</transformations>
</identityProvider>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment