Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writing session cookies #15

Merged
merged 20 commits into from
Oct 29, 2024
Merged

Writing session cookies #15

merged 20 commits into from
Oct 29, 2024

Conversation

owens1127
Copy link
Contributor

@owens1127 owens1127 commented Oct 21, 2024

Updates the auth flow to read and write from cookies.

Description

This PR updates the existing auth flow to set, read, and delete cookies in the proper place.

This PR also adds an abundance of tests to ensure solid coverage on these routes, will also serving as a good example

Motivation and Context

In order to implement auth, we need to store the sessionId in the user's cookies.

Closes Cookies

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • CI/CD changes (changing github actions or deployment scripts)
  • Database migration
  • Environment variable change
  • New package(s)
  • New dependencies
  • Global style changes
  • Project configuration

Checklist:

  • I verified my changes work in the local environment
  • I verified my changes work in the preview environment
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

How has this been tested?

Added a large number of integration tests

Co-authored-by: DamianUduevbo <DamianUduevbo@users.noreply.github.com>
Copy link

vercel bot commented Oct 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
good-dog-licensing-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 27, 2024 8:18pm

}

const hashedPassword = await hashPassword(input.password);

const user = await ctx.prisma.user.create({
const userWithSesion = await ctx.prisma.user.create({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

userWithSession

@owens1127 owens1127 merged commit 9265908 into main Oct 29, 2024
7 checks passed
@owens1127 owens1127 deleted the cookies branch October 29, 2024 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants