Start Mock Server

๐Ÿ‘จโ€๐Ÿ’ผ We're going to test our "Login with GitHub" integration. We've already implemented the HTTP mocks in . But we're not actually loading those mocks yet. So we need you to update the tests to load and start the mocks server.
Additionally, we're going to have you create the request and call the loader. You may want to review the loader in . You'll notice it expects a few things on the request object. Here's a quick summary of what's required:
  1. The request.url should be https://www.epicstack.dev/auth/github/callback
  2. search param called state (can just be a random string)
  3. search param called code (can just be a random string)
  4. A header called cookie which includes the sessionStorage with oauth2:state set to the same value as the state search param.
  5. Method GET
๐Ÿงโ€โ™‚๏ธ Because sessionStorage.commitSession() returns a set-cookie header for a response, and you need a cookie header for a request, I've made a utility for you that does the conversion for you. You'll find it at the bottom of the test file. It's called convertSetCookieToCookie.
npx vitest auth.\$provider

Access Denied

You must login or register for the workshop to view the diff.

Check out this video to see how the diff tab works.