It would be a great feature for user-experience if bakery offered an ahah-compliant callback that subsites could put inside a lightbox or thickbox. While popup windows are not ideal, this would allow subsites to keep users "in state" when performing a bakery login rather than bouncing to another website and possibly creating confusion.

Comments

coltrane’s picture

StatusFileSize
new3.2 KB

Here's a first attempt at providing login from the slave site, not via AHAH but via XMLRPC and having the slave create the cookie. This is written as part of work beginning on #854202: Register and login on slave site

greggles informed me about concern on d.o of having slave sites create the main cookie. This functionality could be optional.

This isn't hashing the username or password yet, it's basically just a port of the site network functionality in

coltrane’s picture

Title: Allow for bakery via ahah » Allow for slave site login
StatusFileSize
new4.97 KB

Here's another approach after talking with greggles. In it we alter the action of the login forms to be a master-only Bakery callback which checks input, authenticates user, and if successful creates cookie and finally redirects back to the slave.

If just authentication fails then we get redirected back to slave Bakery callback which sets the standard message and sends the person to /user.

This is probably better overall than the XMLRPC method in #1.

coltrane’s picture

Status: Active » Needs review

I think #2 needs more polishing, but setting to CNR.

juliangb’s picture

I like this approach (#2) a lot - it seems to split up the tasks between master and slave quite well. I will test in more detail, but one comment... also the comments on #854202: Register and login on slave site will also apply.

+++ bakery.module	14 Jul 2010 23:41:26 -0000
@@ -35,6 +35,20 @@ function bakery_menu() {
+  else {
+    $items['bakery-login'] = array(
+      'title' => 'Login',
+      'access callback' => 'user_is_anonymous',
+      'page callback' => 'bakery_login',
+      'type' => MENU_CALLBACK,
+    );

I'd prefer all paths to start with the bakery/ namespace.

Powered by Dreditor.

coltrane’s picture

Status: Needs review » Closed (duplicate)

This patch is going to be combined into #854202: Register and login on slave site