The first commit updates us to the 2.0 endpoint. The second commit refactors all our handrolled oauth to use a library we were already importing. I'm assigning @egh because he reviewed some some of this oauth stuff in the past.
Special instructions for Review or PO:
The way I tested this was to use the staging env vars, then on the staging env open the profile view and start the connecting process (with the pop up). After the popup happened I'd log out of stage and into aperta locally, complete the pop up and look into network calls for the code, and paste it into my local env. Orcid has seemed to fix the utf-8 issues so I've deleted the patch code.
Notes
Let me know how this looks, I can just do the easy fix as well if you don't think this refactor is worth rewriting the tests.
Code Review Tasks:
Author tasks (delete tasks that don't apply to your PR, this list should be finished before code review):
[x] I have set the correct component(s) in the JIRA ticket
[x] I have set an appropriate resolution in the JIRA ticket
Reviewer tasks (these should be checked or somehow noted before passing on to PO):
[x] I read through the JIRA ticket's AC before doing the rest of the review
[x] I ran the code (in the review environment or locally). I agree the running code fulfills the Acceptance Criteria as stated on the JIRA ticket
[x] I read the code; it looks good
[x] I have found the tests to be sufficient for both positive and negative test cases
JIRA issue: https://jira.plos.org/jira/browse/APERTA-12940
What this PR does:
The first commit updates us to the 2.0 endpoint. The second commit refactors all our handrolled oauth to use a library we were already importing. I'm assigning @egh because he reviewed some some of this oauth stuff in the past.
Special instructions for Review or PO:
The way I tested this was to use the staging env vars, then on the staging env open the profile view and start the connecting process (with the pop up). After the popup happened I'd log out of stage and into aperta locally, complete the pop up and look into network calls for the code, and paste it into my local env. Orcid has seemed to fix the utf-8 issues so I've deleted the patch code.
Notes
Let me know how this looks, I can just do the easy fix as well if you don't think this refactor is worth rewriting the tests.
Code Review Tasks:
Author tasks (delete tasks that don't apply to your PR, this list should be finished before code review):
Reviewer tasks (these should be checked or somehow noted before passing on to PO):