Closed zzooeeyy closed 3 months ago
I think this makes sense, assuming the TODOs will be resolved before we release :)
This looks good to me! One question: should we have unit tests around the TokenExchange
class?
Great callout, we should definitely add some tests for the new paths.
This looks good to me! One question: should we have unit tests around the TokenExchange class?
Yes we totally should, I was going to tackle that after we handle all the special invalid token cases. That way we can ensure we have all the test cases and ways to recover in 1 go... I've added that another task so we don't forget about it:
I was going to tackle that after we handle all the special invalid token cases
I'd encourage you to test the happy path in the happy path PR, and the sad path in the sad path PR! Doing all the tests at once can make it harder to discover what caused errors, whereas doing them more iteratively makes it more obvious when a change is breaking an assumption.
Thanks @ragalie & @paulomarg -- I've updated this PR with tests!
What this PR does
Tophat: 📹 https://videobin.shopify.io/v/J4j8l2
Happy path for token exchange
Note on what else needs to be implemented in other tasks:
id_token
from URL params.Impact on existing apps:
config.wip_new_embedded_auth_strategy
Checklist
Before submitting the PR, please consider if any of the following are needed:
CHANGELOG.md
if the changes would impact usersREADME.md
, if appropriate./docs
, if necessary