Welcome to the EpicWeb.dev Workshop app!

This is the deployed version. Run locally for full experience.

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