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

Redirect to login page after sign up submission #3225

Closed
bsilverstein95 opened this issue Jul 28, 2016 · 7 comments
Closed

Redirect to login page after sign up submission #3225

bsilverstein95 opened this issue Jul 28, 2016 · 7 comments

Comments

@bsilverstein95
Copy link
Contributor

bsilverstein95 commented Jul 28, 2016

While testing email confirmation with @pdurbin we happened upon a bug wherein after creating a [builtin] user, the redirect page brings you to loginpage.xhtml after logging in the newly created user. Using demo.dataverse.org to test (v4.4 build 132-47b04ed), the resulting URL from pressing Sign Up via loginpage.xhtml is:

https://demo.dataverse.org/dataverseuser.xhtml?editMode=CREATE&redirectPage=%2Floginpage.xhtml

Note the redirectPage.

To reproduce this you'll be redirected upon signup to whatever page you hit "Sign Up" from. So if it's from the root dataverse, great! However if you are on the login page (after logging out) and find yourself without a user, then go to sign up, you'll be brought to the login page after registering (while already being logged in). See screenshot below and note that there is a user dropdown in the upper right while also displaying login form.

loginbug

This is the direct landing page of registering as user foo bar (PHD, astrophysics) upon hitting Sign Up from the login page. So hitting Sign Up from any page will redirect you to that respective location assuming you can view it while logged out, but perhaps after signing up from loginpage.xhtml the user should be forcibly sent to either the home page or the account page.

@scolapasta
Copy link
Contributor

Something may be broken...

There is an optional parameter on each xhtml file that is supposed to direct it to where to go after login, if not itself.

login.xhtml has:
<ui:param name="loginRedirectPage" value="dataverse.xhtml"/>

But clearly it's not doing that...

@scolapasta
Copy link
Contributor

Ah, I think this is a regression from when I moved some logic from the header to the new navigationWrapper.

@djbrooke
Copy link
Contributor

@bsilverstein95 - welcome back! I'm going to assign this one to you.

@pdurbin
Copy link
Member

pdurbin commented Jun 25, 2017

I wouldn't be surprised if this is fixed now that the UI is completely different (#3338) and that shib redirect works (#1551). @bsilverstein95 can you retest?

@mheppler
Copy link
Contributor

mheppler commented Oct 25, 2018

@pdurbin I can confirm this bug is still buggy in develop.

@scolapasta I tried looking at the loginRedirectPage param on the login.xhtml compared to how other pages use it, and couldn't see an obvious fix. There are 8 other pages that use the same parameter.

As stated above the problem is that signup/"Create Account" page should never have the login page /dataverseuser.xhtml?editMode=CREATE&redirectPage=%2Floginpage.xhtml as a redirect destination.

@landreev
Copy link
Contributor

I made a PR with a simplest possible 3 line fix.
No refactoring of the redirect framework in this PR.

@pdurbin
Copy link
Member

pdurbin commented Nov 21, 2018

Pull request #5335 may not be a complete solution of "someone emailed me a link to an unpublished dataset that I couldn't see and I clicked the link and went through the create account workflow and landed on the dataset" workflow. Instead, this user ends on the home page. But it's better than the login page. It's incremental progress. Approved. Moving to QA. Kudos to @landreev for coming up with a quick fix because I didn't pick this up over fear of the work involved in a more complete solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants