U4-9913 - Build invite APIs including the deep link handler/token

Created by Shannon Deminick 15 May 2017, 08:26:10 Updated by Shannon Deminick 10 Jul 2017, 05:37:33

Relates to: U4-10133

Subtask of: U4-8632

  • Check if they have an email server configured otherwise it's disabled

  • Generate and validate a token (use SecurityStampToken column)

  • Need a generic email - probably use a translation entry which people can override on their own (check what we do for the forgot password)

  • Token validation done via JS to the user controller, if token is invalid then the UI handles it

Comments

Shannon Deminick 20 Jun 2017, 02:26:18

To test:

  • This is in the user-group-permissions branch
  • ensure you have smtp server enabled, easiest is to use the <specifiedPickupDirectory pickupDirectoryLocation="X:\Projects\TEMP\SMTP" /> setting
  • go to the user section, choose invite, fill in the details
  • you'll get an email generated
  • click on the link, it will prompt you to change the password which will be successful, you can test validation, etc... too
  • The last step to change the avatar isn't done yet

The token is generated with Identity APIs and is based on the hash of the security stamp token. The Token is validated with Identity APIs too.

The email is localized via the language files which includes the subject.


Claus Jensen 21 Jun 2017, 08:58:00

There's an issue with this branch:

  • Upgrading from <7.7 to this branch, requires the AuthorizeUpgrade wizard to run.
  • The wizard requires authentication to be able to run migrations.
  • Authentication requires you to log in.
  • The BackOfficeSignInManager code required to do a login, fails without the new tables added in 7.7 - but these aren't added until the migration has been run (umbracoUser2UserGroup table was the one it complained about).

So there's kinda a catch22 situation here - any suggestions on how to resolve?


Shannon Deminick 21 Jun 2017, 09:18:28

Good catch will need to sort something out, we've had a similar issue before.


Claus Jensen 21 Jun 2017, 09:21:43

I'll test the stuff above with a fresh db (that should just work since it doesnt need to run migration) .. have unassigned myself if you want to reassign to you for rework.


Claus Jensen 07 Jul 2017, 08:02:57

Retested with pickup dir and it generates an email. Still issues with the async stuff when using a real smtp (papercut) server.

Also seems to be missing some kind of confirmation when the email is sent. I only get a UI response (an error) if the email isn't sent. Otherwise the UI just stays at the invite screen with all fields filled out. Do we have another task for this part (as I assume this task is just for the API part) ?

Can see the rest of the invite flow UI when clicking the link in the email is handled in http://issues.umbraco.org/issue/U4-9914 so will keep that out of this issue.


Priority: Normal

Type: Task

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version: 7.7.0

Sprint: Sprint 62

Story Points: 3

Cycle: