WebAuth Client MVP
See https://github.com/hexpm/hexpm/issues/1024.
As of right now, there are no tests due to the following issues:
- I need to get mix task output in order to submit the user code
- I need to mock a logged in user at
/login/web_auth/submit
I need to get mix task output in order to submit the user code
All output is sent to the current test process. You can assert on it like this: https://github.com/hexpm/hex/blob/main/test/mix/tasks/hex.info_test.exs#L18.
I need to mock a logged in user at /login/web_auth/submit
If you need an endpoint on hexpm that does this you can add it here: https://github.com/hexpm/hexpm/blob/main/lib/hexpm_web/router.ex#L279-L298.
If you need an endpoint on hexpm that does this you can add it here:
Are you suggesting that I call the WebAuth.submit function from the TestController with some random user?
Are you suggesting that I call the WebAuth.submit function from the TestController with some random user?
I am not sure what you need to do, but if you need a user to perform a webauth submit in a test scenario that could be one way of doing it.
@ericmj and @wojtekmach , I have got a working task ready. Here's a video showing the task:
https://user-images.githubusercontent.com/67545861/147077732-abfb6ce5-e2ca-42f8-b758-c27202655e73.mp4
Note: I think the frame rate is slow again, but now I think it's my screen recorder's fault.
@ericmj, @wojtekmach Ping.
I noticed that you ran the CI on the PR. The tests will fail until the backend PR has been merged.
If you would like to run the tests, I suggest that you checkout the PRs locally.