snowdriftcoop / snowdrift

Infrastructure for Snowdrift.coop. This is a MIRROR of https://gitlab.com/snowdrift/snowdrift. Your issue reports and merge requests are welcome, but they will be moved to gitlab.com. You are encouraged to start there instead!
https://snowdrift.coop
GNU Affero General Public License v3.0
92 stars 36 forks source link

Redirect to the ult-destination when a user is booted to /auth/login. #333

Closed sayoder closed 7 years ago

sayoder commented 7 years ago

Yesod handily passes along an "ultimate destination", which we can use to redirect the user back to the page that they originally requested. To see this in action, visit /payment-info while logged out. After logging in, the user is now redirected to /payment-info instead of /dashboard.

chreekat commented 7 years ago

Hmm, I tried doing this before and it seemed to cause trouble. Both myself and @mray experienced getting redirected away from Snowdrift when I tried using redirectUltDest. Like a lot of Yesod, I think this needs a first-principles review and possibly refactor.

I could swear I remember that Snowdrift handled this manually, but I'm looking through the code now and not finding it. :/ @wolftune do you remember if/when that would have been true? I can look more....

chreekat commented 7 years ago

I mean Snowdrift historically* handled it. Some time in the past.

wolftune commented 7 years ago

At one time in the past, it worked and had no issues too. We have no clue why the bug started happening.

jazzyeagle commented 7 years ago

I applied the patch to the branch I was working on for the Discourse SSO, and this corrected the issue we were having. Not knowing what happened in the past and also considering all the extra stuff that was stripped out previously, there's no guarantee that we won't experience any issues down the road as we start to add stuff back in. That being said, if we create some tests for this, should there be any issues down the road, we may get a better idea of what's causing issues at this point and fix it properly so that the redirect continues to work.

On Tue, Dec 6, 2016 at 10:24 PM, Aaron Wolf notifications@github.com wrote:

At one time in the past, it worked and had no issues too. We have no clue why the bug started happening.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/snowdriftcoop/snowdrift/pull/333#issuecomment-265352295, or mute the thread https://github.com/notifications/unsubscribe-auth/ABLOQl9gJ9WUEUW5v7nYHL8OtfoaVFqmks5rFjT8gaJpZM4LF0cJ .

chreekat commented 7 years ago

I'm merging. Let's worry about any issues when/if they arise