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

letter-proofing updates #4

Open
1 of 11 tasks
fredrikt opened this issue Jun 29, 2020 · 3 comments
Open
1 of 11 tasks

letter-proofing updates #4

fredrikt opened this issue Jun 29, 2020 · 3 comments

Comments

@fredrikt
Copy link
Contributor

Based on code review of the backend service letter-proofing, I would like to make a couple of changes that will need to be synchronised with the SUNET/eduid-front component.

  • Check for expired codes in the /verify-code endpoint (already done in 398304c)
  • Update SUNET/eduid-front to handle the new return message 'letter.expired' returned from /verify-code
  • Check how the frontend handles the errors 'User is already verified' and 'Another nin is already registered for this user' that can be returned by POST /proofing. See if these can be turned into CommonMsg Enums instead. Note that these are returned from code shared with other NIN validating backends.
  • Datetimes (such as letter_expires) are currently returned as strings with decimal numbers (UNIX time) in them. It would be nicer to return them as ISO formatted datetime strings, if the Javascript side can handle that. Investigate and proceed accordingly.
  • Change the backend to not delete expired states on GET /proofing (and only returning 'letter.expired' once). Remove expired states when a request to send a letter is made instead.
  • If frontend team agrees, include number of days since code was requested in the GET /proofing state result, so the frontend can calm impatient users.
  • Update the frontend to accommodate this - probably with some improved user interface making it clear that the letter is on it's way or expired.
  • Initiate transition from using POST /proofing to request a letter, to using POST /request-code by making a backend that handles both endpoints and release it to production.
  • Update SUNET/eduid-front to move to /request-code and release it to production.
  • Add stats generation in the backend for number of days/hours between requesting a letter and entering the code.
  • Remove the POST /proofing endpoint.
@njons
Copy link

njons commented Jul 27, 2020

FYI, I have created frontend issues based on the 4 following lines:

  • checkbox 2: Update SUNET/eduid-front to handle the new return message 'letter.expired' returned from /verify-code
  • checkbox 3: Check how the frontend handles the errors 'User is already verified' and 'Another nin is already registered for this user' that can be returned by POST /proofing. See if these can be turned into CommonMsg Enums instead. Note that these are returned from code shared with other NIN validating backends.
  • checkbox 6: Include number of days since code was requested in the GET /proofing state result, so the frontend can calm impatient users. (Update the frontend to accommodate this)
  • checkbox 9: Update SUNET/eduid-front to move to /request-code and release it to production.

@fredrikt Please let me know if I have missed anything in your list.

@njons
Copy link

njons commented Jul 27, 2020

Datetimes (such as letter_expires) are currently returned as strings with decimal numbers (UNIX time) in them. It would be nicer to return them as ISO formatted datetime strings, if the Javascript side can handle that. Investigate and proceed accordingly.

@fredrikt: About this one I'd say yes, but please check that your intended format is covered or let me know if I have misunderstood

@fredrikt
Copy link
Contributor Author

Datetimes (such as letter_expires) are currently returned as strings with decimal numbers (UNIX time) in them. It would be nicer to return them as ISO formatted datetime strings, if the Javascript side can handle that. Investigate and proceed accordingly.

@fredrikt: About this one I'd say yes, but please check that your intended format is covered or let me know if I have misunderstood

Done:

Date.parse('2020-09-28T17:59:16.471770+00:00')
1601315956471

@fredrikt fredrikt reopened this Sep 28, 2020
@johanlundberg johanlundberg transferred this issue from SUNET/eduid-webapp Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants