AzureAD / active-directory-b2c-wordpress-plugin-openidconnect

A plugin for WordPress that allows users to authenticate with Azure AD B2C using OpenID Connect.
MIT License
31 stars 28 forks source link

Multisite Configuration #13

Open DLozanoNavas opened 7 years ago

DLozanoNavas commented 7 years ago

Hello, I have a multi site network and I'm using woo-commerce in one of those sites, I'm also using AAD B2C in order to keep my customers data secure, but im struggling with the multi-site configuration. Should every site on my network have it's own set of policies? How it should be set the proper reply uris for the application and the policy?

RiaanGouws commented 5 years ago

Hello

I am deploying this plugin in a multi site environment also. Since the documentation for this plugin is non existent - does it support a multi site deployment?

If so, how do I map the network admin and other admin roles to AADB2C groups/user accounts?

Thanks! Rian

tripflex commented 4 years ago

Seems as though Microsoft does not care about this at all ... since it's clear nothing has been responded to even since 2017 :(

TheSaltyKorean commented 4 years ago

Seems as though Microsoft does not care about this at all ... since it's clear nothing has been responded to even since 2017 :(

This is open source. Feel free to open up the code and have at it.

princeshahnawaz2012 commented 4 years ago

My WP multisite has more than 300 sites which means I need to store the redirect_urls in Azure AD B2C but this number of redirect_urls cannot be stored in AD B2C I guess. What I do is that when the user logs in through www.abc1.com/wp-admin, it first redirects to B2C login page with the default redirect url(www.abc.com) that I set. Once the token is verified, the user is redirected to their site(www.abc1.com). But it doesn't seem to work.I am even not sure if it is the best approach to redirect the user to site they want to access by this way.

//fetch the user' site id and redirect to the site. $user_blogs = get_blogs_of_user($userID); if (!empty($user_blogs)) { $siteInfo = array(); foreach ($user_blogs as $site_id => $site_values) { $siteInfo[] = $site_values->siteurl; } $redirect_url = $siteInfo[0] ; // to the primary site.. }

// Set cookies to authenticate on WP side wp_set_auth_cookie($userID);

//Redirect to primary site that assigned to the user wp_safe_redirect($redirect_url);

Let me know your suggestions how I can handle the process.