hivesolutions / appier-extras

Appier on Steroids
http://appier-extras.hive.pt
2 stars 3 forks source link

#401 Returning to previous page instead of sign in page #40

Closed 3rdvision closed 2 years ago

3rdvision commented 2 years ago
- -
Issue https://github.com/ripe-tech/ripe-robin-revamp/issues/401 - This is also reproducible for any oauth login flow -- instead of returning to sign in page we should return to the previous page that has all the parameters like ?next=... necessary to not lose the login flow.
Decisions - Recover password with link to return to the previous page instead of the sign in page
3rdvision commented 2 years ago

@joamag manual assign

coveralls commented 2 years ago

Coverage Status

Coverage remained the same at 54.16% when pulling 22db46c5815f15dbe15898d433b6583aec752a02 on 3rdvision:dva/401-forgot_password_trap into e83f06182682178b762545432dac9290ba4cb7db on hivesolutions:master.

joamag commented 2 years ago

This is not the best fix, let's instead propagate the next value to the recover password page instead and then use it in the login link :)

3rdvision commented 2 years ago

@joamag Done!

joamag commented 2 years ago

@3rdvision schedule 15 min to go over this one https://calendly.com/joao-platforme/code-review

3rdvision commented 2 years ago

@joamag Simplifying to url_for('admin.recover', next = next) works but when &next= it adds 1 empty URL parameter when next is empty string. image

3rdvision commented 2 years ago

@joamag I simplified by setting next to None in case it comes as empty string. This way url_for works as expected :smile:

joamag commented 2 years ago

@3rdvision I'm going to merge the PR and run the changes myself to speed up the process, I'll share the commit afterward

joamag commented 2 years ago

@3rdvision here it is ;) https://github.com/hivesolutions/appier_extras/commit/0be8c3c628ffa2e2197c34e666ff0c245e955784