Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • AnandBhopale 53 posts 170 karma points
    May 07, 2021 @ 16:45
    AnandBhopale
    0

    unable to combine Front-end and Back-end Authenticator

    Hi,

    I am integrating my Umbraco Site with Azure Active Directory.

    for backend login, I am using following link

    https://shazwazza.com/post/configuring-azure-active-directory-login-with-umbraco/

    for member login, I am using following link

    https://shazwazza.com/post/configuring-azure-active-directory-login-with-umbraco-members/

    Both these solutions are great and working perfectly in two different project.

    Now, I want to combine them in one project and have one start up class (say UmbracoIdentityStartup instead of UmbracoStandardOwinStartup)

    This works only for front-end login

    Then I have combined the code to have in UmbracoADAuthExtensions.cs like

     public class UmbracoIdentityOwinStartup : UmbracoIdentityOwinStartupBase
    {
        readonly string TenantID = ConfigurationManager.AppSettings["azureAd:tenantId"];
        readonly string ClientID = ConfigurationManager.AppSettings["azureAd:clientId"];
        readonly string redirectUrl = ConfigurationManager.AppSettings["FrontEndRedirectUrl"];
        readonly string BackendredirectUrl = ConfigurationManager.AppSettings["BackEndRedirectUrl"];
        protected override void ConfigureUmbracoUserManager(IAppBuilder app)
        {
            UmbracoUserManager(app);
        //   This is additional line
            **app.ConfigureBackOfficeAzureActiveDirectoryAuth(TenantID, ClientID, BackendredirectUrl, new Guid(TenantID));**
    
        }
    

    Rest of Code is same.

    As result of combination,

    1. I am able to authenticate on Front end
    2. Back-end goes into infinite loop after login

    I need guidance from experts on how to solve this

Please Sign in or register to post replies

Write your reply to:

Draft