Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logining-in should not bring you to home page #2321

Closed
xabier opened this issue Dec 4, 2017 · 10 comments
Closed

Logining-in should not bring you to home page #2321

xabier opened this issue Dec 4, 2017 · 10 comments
Assignees
Milestone

Comments

@xabier
Copy link
Contributor

xabier commented Dec 4, 2017

This is a Bug Report

🎩 Description

For bug reports:

  • What went wrong?

When you are navigating on Decidim and suddenly you are prompted to sign-in, once you do it Decidim redirect you to the home page.

  • What did you expect should have happened?

I expect to remain on the same page where I was asked to sign-in

  • What was the config you used?

This bug is not config specific, it applies (to my knowledge) to all decidims.

@xabier xabier added the type: bug Issues that describe a bug label Dec 4, 2017
@xabier xabier mentioned this issue Dec 4, 2017
6 tasks
@xabier
Copy link
Contributor Author

xabier commented Dec 4, 2017

@josepjaume @mrcasals please check this out.

@josepjaume
Copy link
Contributor

I actually worked a bit in this direction. Please label and prioritize accordingly 👍

@josepjaume
Copy link
Contributor

To add more context: keeping the user on the same page is not always the desired solution. Imagine we are searching the proposal list, we try to vote a proposal, and then we're prompted to log in. We probably want the user to come back to the proposal she tried to vote, instead of the list (we would have lost context). Same applies to other situations like creating a new proposal, etc.

@xabier
Copy link
Contributor Author

xabier commented Dec 7, 2017

To add more context: keeping the user on the same page is not always the desired solution. Imagine we are searching the proposal list, we try to vote a proposal, and then we're prompted to log in. We probably want the user to come back to the proposal she tried to vote, instead of the list (we would have lost context). Same applies to other situations like creating a new proposal, etc.

I understand the cases where you want users to be redirected somewhere else other than the page where they were located when prompted to login, nice point. But these are very rare cases, in the case of the proposal this would only happen if the page is random and when returning to the "same" page, well it is actually not the same 😄

In any case, I think it is much better that the default behaviour brings you to the page where you where. Seriously. I use decidim quite a lot, I don't use cookies (this is a personal security choice) and whenever I am directed to decidim via a link (shared on telegram, mail or otherwise) and I need to perform an action... I have to re-start, is very annoying.

Let's try to bring the user to the page she was originaly when prompted to login and then we can improve from there.

@josepjaume
Copy link
Contributor

Definitely! But we can do both :). It's not a difficult task, just needs to be solved right.

@xabier
Copy link
Contributor Author

xabier commented Dec 9, 2017

Sure, but should not leave issues behind trying to find a perfect solution if an optimal good-enough solution is a low-hanging-fruit

@josepjaume
Copy link
Contributor

josepjaume commented Dec 9, 2017 via email

@xabier
Copy link
Contributor Author

xabier commented Dec 9, 2017

Nice!

@mrcasals mrcasals removed their assignment Dec 11, 2017
@oriolgual oriolgual self-assigned this Dec 18, 2017
@josepjaume
Copy link
Contributor

@oriolgual two things to consider:

There's two scenarios where we can redirect the user outside of their current page and we'd like them to return to the same place.

  1. We ask them to log in.
  2. We need them to validate against some authorization, either because that authorization doesn't exist yet, it's expired, or we need more data.

It's not always gonna be easy to return the user to the same page (how to return to the same position in a list?) - I suggest using a session cookie to store the page where we want the user to be redirected after the login flow (via a get parameter like redirect_url).

Devise suggests a similar approach and we had it working in the past, but it got removed in #1966 because it wasn't working properly.

This can be quite complex but it has an enormous impact on the user flow.

@deivid-rodriguez
Copy link
Contributor

Also, there's some related discussion here, in case it may help.

@ghost ghost added in-progress and removed type: bug Issues that describe a bug labels Jan 10, 2018
@ghost ghost removed the in-progress label Jan 12, 2018
@Xfolchf Xfolchf added this to the 0.9 milestone Jan 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants