Skip to main content
highlighted the code
Source Link
Sumit Bhatia
  • 5.9k
  • 2
  • 9
  • 25

As already mentioned by Mark the best way is to use configuration from Sitecore.

Keep in mind the following parts:

  • IdentityProvidersProcessorIdentityProvidersProcessor -- here you can set your authentication settings and configure your app to use the specific authentication like: "args.App.UseGoogleAuthentication(googleAuthOptions);"args.App.UseGoogleAuthentication(googleAuthOptions);
  • AuthenticationMiddlewareAuthenticationMiddleware - you can use Nuget packages like "Microsoft.Owin.Security.Google"Microsoft.Owin.Security.Google

Optional you if you have a custom claim that needs to be linked for a user as identifier you can use Sitecore.Owin.Authentication.Services.DefaultExternalUserBuilderSitecore.Owin.Authentication.Services.DefaultExternalUserBuilder, here you can override the CreateUniqueUserNameCreateUniqueUserName.

As already mentioned by Mark the best way is to use configuration from Sitecore.

Keep in mind the following parts:

  • IdentityProvidersProcessor -- here you can set your authentication settings and configure your app to use the specific authentication like: "args.App.UseGoogleAuthentication(googleAuthOptions);"
  • AuthenticationMiddleware - you can use Nuget packages like "Microsoft.Owin.Security.Google"

Optional you if you have a custom claim that needs to be linked for a user as identifier you can use Sitecore.Owin.Authentication.Services.DefaultExternalUserBuilder, here you can override the CreateUniqueUserName.

As already mentioned by Mark the best way is to use configuration from Sitecore.

Keep in mind the following parts:

  • IdentityProvidersProcessor -- here you can set your authentication settings and configure your app to use the specific authentication like: args.App.UseGoogleAuthentication(googleAuthOptions);
  • AuthenticationMiddleware - you can use Nuget packages like Microsoft.Owin.Security.Google

Optional you if you have a custom claim that needs to be linked for a user as identifier you can use Sitecore.Owin.Authentication.Services.DefaultExternalUserBuilder, here you can override the CreateUniqueUserName.

Source Link
Danny Paul
  • 332
  • 1
  • 2
  • 12

As already mentioned by Mark the best way is to use configuration from Sitecore.

Keep in mind the following parts:

  • IdentityProvidersProcessor -- here you can set your authentication settings and configure your app to use the specific authentication like: "args.App.UseGoogleAuthentication(googleAuthOptions);"
  • AuthenticationMiddleware - you can use Nuget packages like "Microsoft.Owin.Security.Google"

Optional you if you have a custom claim that needs to be linked for a user as identifier you can use Sitecore.Owin.Authentication.Services.DefaultExternalUserBuilder, here you can override the CreateUniqueUserName.