pressbooks / pressbooks-aldine

Aldine is the default root theme for Pressbooks.
https://pressbooks.org/
GNU General Public License v3.0
11 stars 7 forks source link

Login redirect from network home pages #339

Closed tw77 closed 1 year ago

tw77 commented 2 years ago

Description

Currently, when a user signs in from a network home page, they are brought back to the home page upon being signed in. This is the case for both SSO and standard login. This is true more broadly on Pressbooks networks: when a user signs in from somewhere, they are brought back to the page they signed in on rather than being brought to the admin dashboard.

UCF is interested in a more streamlined process where, when a user signs in from the network home page (with SSO or standard login), they are immediately brought to the admin dashboard.

The reason for the current rule on Pressbooks networks (user taken back to the page they signed in from) has to do with private books. Readers who navigate to a private book and find that they need to sign in to read the book will expect that, upon signing in, they'll be able to read the private content that was previously hidden from them; landing the reader on the admin dashboard instead of keeping them on the book would be disorienting in this case.

But signing in from the home page is a different scenario where users likely intend to access the admin dashboard. Landing users on the admin dashboard after signing in from the network home page would be welcome for UCF and potentially for other networks.

Could this be implemented for network home pages specifically (https://developer.wordpress.org/reference/functions/wp_login_url/) ?

Steps to Reproduce

  1. Navigate to the home page of a network.
  2. Click "Sign In"
  3. Sign in either with SSO or standard login.

Desired behavior: We arrive (logged in) on the admin dashboard.

Actual behavior: We are returned to the home page. We then need to click Admin in the top-right corner in order to access the admin dashboard.

paradisojr commented 2 years ago

Has there been any movement on this request? @SteelWagstaff or @tw77 Thanks!

paradisojr commented 2 years ago

Just checking in again... @SteelWagstaff or @tw77 ...is this still being considered?

SteelWagstaff commented 2 years ago

Hi Jim, it's in our needs review column but hasn't been accepted into a sprint. Not likely to happen any time in next month. You're the only person who has requested it and it has a bunch of other implications. Still thinking about best way to approach. Sorry, but that's the honest truth right now.

paradisojr commented 2 years ago

Thanks for your reply, Steel. I completely understand. Please keep me posted. 👍

SteelWagstaff commented 1 year ago

This was included in Aldine 1.18.1: https://github.com/pressbooks/pressbooks-aldine/pull/384

paradisojr commented 1 year ago

This was included in Aldine 1.18.1: #384

@SteelWagstaff This doesn’t work on UCF’s network as far as I can tell. I just tried logging I with SSO and was brought back to the home page, not the Admin dashboard. Is there a config change we need to make to implement this? Thanks.

SteelWagstaff commented 1 year ago

@paradisojr looks like it's not working as expected with SSO. I'll open an issue in the SAML plugin to try to address there.

paradisojr commented 1 year ago

@paradisojr looks like it's not working as expected with SSO. I'll open an issue in the SAML plugin to try to address there.

Thanks for looking into it, @SteelWagstaff . I confirmed it does indeed work with standard login…just has a problem with the SSO.