DMPRoadmap / roadmap

DCC/UC3 collaboration for a data management planning tool
MIT License
102 stars 109 forks source link

Account creation error #271

Closed sjDCC closed 7 years ago

sjDCC commented 7 years ago

I shared a plan with a my personal account and was prompted to enter a password for my new account when I followed the link to view this. The following error was displayed, though logging in with my personal email and the password I set shows that the account was created nonetheless. picture1

On reflection, I wonder if this error occurred as the email had been known by the system at some point. Last week I had changed my account name to my personal email under edit profile and have since switched it back. Perhaps the trace of that threw the error?

vyruss commented 7 years ago

Not a bug. Installation-specific, needs a few configuration tweaks

briri commented 7 years ago

where did the issue occur? dmponline-test or roadmap-stg and what config settings @vyruss ? An invalid token error sounds like the token has a lifespan and the login attempt was outside that boundary. So maybe its just too short a timespan?

sjDCC commented 7 years ago

This occurred on roadmap-stg. I think it may be because I had used that email temporarily. I had changed my account to that last week in testing and mis-remembered that, hence getting locked out when I uninstalled firefox and no longer had login details saved. I had changed it back so sent share plan invite to personal email today.

briri commented 7 years ago

ok. I'll see if we can replicate it

vyruss commented 7 years ago

Whoops, I assumed it was the wrong hostname issue (which isn't set up properly on dmponline-test yet). @briri I'm referring to config/environments/production.rb:

config.action_mailer.default_url_options = { :host => 'my.hostname.here' }
vyruss commented 7 years ago

After investigation, this looks like a bug: for some reason, the email that goes out contains a link to the shared plan, instead of an invitation link.

sjDCC commented 7 years ago

I've tried sharing a plan with an account that has already been created in the system but not yet validated and didn't get an error so I think this is now fixed on DMPonline. I couldn't full test on DMPRoadmap staging. I think you're maybe one PR behind @briri as the message text in the sharing email was different and the link didn't resolve. roadmap-staging

stephaniesimms commented 7 years ago

Things should be in sync now as @briri just deployed the latest code to roadmap-stage. I observed the same thing you describe above @sjDCC - no error message but the email text is missing the plan owner name and the link does not resolve (screenshot below).

screen shot 2017-05-16 at 10 24 43 am

briri commented 7 years ago

which of the links is not resolving?

briri commented 7 years ago

The email template uses the user's firstname and surname but those fields are likely blank in this scenario hence the '"DCC guidance test (NIH template)" by .'

If we switch it to use name instead it will display the email address there if the name is not available.

vyruss commented 7 years ago

@briri let's fall back on the email if First name or Surname is empty

briri commented 7 years ago

ok. its ready for you in the PR with the change to when a template version is created

sjDCC commented 7 years ago

Hey @briri The link that gave an error for me was "Click here" to accept the invitation...

sjDCC commented 7 years ago

This is all working on DMPonline test. Just leaving open for now so @stephaniesimms can check all ok on staging and then close

stephaniesimms commented 7 years ago

new issues have been introduced that prevent me from testing the entire workflow. i now get an error message when signing out of the system to accept the invitation, which appears to be related to some Shib configuration (screenshot below)

clicking the link in the invitation produces the error message in the second screenshot below.

the email title makes it look like spam. revised title in the comments below and added to the master email notices Google doc: https://docs.google.com/document/d/1Zt3QfPZ2q6yMOCVFOevXviwRX-XbZeGSxAAvbRa9w-M/edit

Signout Shib error message screen shot 2017-05-31 at 3 29 10 pm

Error message from clicking link in email invitation screen shot 2017-06-05 at 11 55 06 am

invitation-email

briri commented 7 years ago

this logout issue may be due to shib not being configured properly on stage. I think this must be new, we did not call the shib logout in the past. We got shib working on dev today. I'll set aside some time to set it up on stage tomorrow

stephaniesimms commented 7 years ago

@sjdcc can you confirm this is ok? Update email title for inviting a user to contribute to a plan who does not yet have an new account (same as the title for other share plan notices):

Email title: A Data Management Plan in [TOOL NAME] has been shared with you

vyruss commented 7 years ago

@stephaniesimms I just made the title the same (PR #398 )

sjDCC commented 7 years ago

Yes, looks good.

stephaniesimms commented 7 years ago

The process works as expected and revised email looks good. Closing issue.