Create Session
๐จโ๐ผ If you're logged in and you go
to , you'll find a list of your
social media connections and a button to add another one (right now we only
support GitHub, but you can add multiple). When the user connects GitHub, they
go through the regular auth flow and land in our auth callback. At that point
we know who the user is from their request so we can create the connection for
them and from there, they are able to use GitHub to login.
We want to test this flow. You're going to need to make the
request
have the
logged in user's cookie with a session ID so we can look them up as an existing
user. Otherwise we'll think they're a new user and send them to the onboarding
flow.So you'll need to create a user and their session, and add their session ID.
Then we want you to assert that the connection was created for them properly
In , you'll find that we generate
a GitHub user for our mocks and we export the
mockGitHubProfile
which has the
id
you need to lookup the user's connection.๐งโโ๏ธ I've already gotten the test started for you. But you'll need to finish it
up.
npx vitest auth