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

Added Authentication and User creation #41

Merged
merged 150 commits into from
Oct 28, 2023
Merged

Conversation

ketphan02
Copy link
Contributor

@ketphan02 ketphan02 commented Oct 6, 2023

Problem

  • We need user creation
  • We need authentication (Google login and email/password login)

Changes

  • Added google auth and credential auth options
  • Added db models:
    • User
    • Account (for Google Authentication)
    • Video (Generic model, need more details later)
  • Added configs to tsconfig.json for cleaner imports
  • Added a log in page to test the credentials (works ✅), this needs more work later
  • Logger log api visit (middleware.ts)
  • Added additional Prisma setup
  • Added README for environment variables

Unrelated changes but needed to do

  • Workflow for cypress
  • Add logging and storing artifacts if fail pipeline (Github Actions)

Screenshots

Login page
image
Db after login
image
image

Dependency

Waiting for #36 and #54 to be merged

Closing issues

Closes #38
Closes #39
Closes #33
Closes #110

ketphan02 added 6 commits October 5, 2023 14:46
- Added google auth and credential auth options
- Added User model and Video model
- Added configs to have cleaner imports
…yling

- Added new modal Account to support login with Google
@ketphan02 ketphan02 added the feature Feature from Project Plan label Oct 6, 2023
@ketphan02 ketphan02 self-assigned this Oct 6, 2023
This was linked to issues Oct 6, 2023
@ketphan02 ketphan02 marked this pull request as draft October 6, 2023 01:17
@ketphan02 ketphan02 changed the base branch from 29-add-prisma-to-project to master October 6, 2023 01:17
@ketphan02 ketphan02 added setup Project setup task and removed setup Project setup task labels Oct 6, 2023
@ketphan02 ketphan02 mentioned this pull request Oct 6, 2023
Copy link
Contributor

@justino599 justino599 left a comment

Choose a reason for hiding this comment

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

Overall looking good! You've been hard at work wow!

prisma/migrations/migration_lock.toml Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
prisma/migrations/20231006003801_init/migration.sql Outdated Show resolved Hide resolved
src/app/(auth)/signin/page.tsx Outdated Show resolved Hide resolved
@ketphan02 ketphan02 marked this pull request as ready for review October 6, 2023 17:28
README.md Outdated Show resolved Hide resolved
src/app/(auth)/signin/page.tsx Show resolved Hide resolved
src/lib/auth.ts Show resolved Hide resolved
@Hedgemon4 Hedgemon4 marked this pull request as draft October 6, 2023 17:42
Copy link
Contributor

@Hedgemon4 Hedgemon4 left a comment

Choose a reason for hiding this comment

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

Also, I don't think we should merge until we have unit tests

src/lib/auth.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@te-sa te-sa left a comment

Choose a reason for hiding this comment

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

Good job! Everything seems to run locally for me now. The only issue I am finding is that running commands from the README doesn't work though, since it is no longer in root, would be nice to have that if possible. Also: pls lint

docs/guides/local_development_setup.md Show resolved Hide resolved
docs/guides/local_development_setup.md Show resolved Hide resolved
Copy link
Contributor

@Hedgemon4 Hedgemon4 left a comment

Choose a reason for hiding this comment

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

Thank you for working on this K. It looks mostly good, just a few small changes.

docs/guides/local_docker_development_setup.md Show resolved Hide resolved
.github/workflows/lint.yml Show resolved Hide resolved
.github/workflows/vercel_preview_deployment.yml Outdated Show resolved Hide resolved
Dockerfile.dev Show resolved Hide resolved
cypress/component/demo-component.cy.tsx Show resolved Hide resolved
package.json Show resolved Hide resolved
src/app/(auth)/signin/page.tsx Show resolved Hide resolved
@Hedgemon4
Copy link
Contributor

Some of the things in this PR should have been in a separate PR. As a convention, I think that unless there is a good reason for it, each PR should correspond to a single issue.

justino599
justino599 previously approved these changes Oct 27, 2023
Copy link
Contributor

@justino599 justino599 left a comment

Choose a reason for hiding this comment

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

Couple small things

prisma/schema.prisma Outdated Show resolved Hide resolved
src/app/(auth)/signin/page.tsx Show resolved Hide resolved
Co-authored-by: Justin Schoenit <[email protected]>
.dockerignore Outdated Show resolved Hide resolved
Copy link
Contributor

@justino599 justino599 left a comment

Choose a reason for hiding this comment

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

✅✅✅✅✅✅✅

Copy link
Contributor

@Hedgemon4 Hedgemon4 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@te-sa te-sa left a comment

Choose a reason for hiding this comment

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

LGTM

@ketphan02 ketphan02 merged commit 413f404 into master Oct 28, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task Task to complete for a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add logging Handle backend for log in Test user creation Create user model User creation
4 participants