Skip to content

feat: auth package#433

Draft
Vicentesan wants to merge 34 commits intomainfrom
auth-package
Draft

feat: auth package#433
Vicentesan wants to merge 34 commits intomainfrom
auth-package

Conversation

@Vicentesan
Copy link
Collaborator

@Vicentesan Vicentesan commented Feb 21, 2025

This PR introduces the @palmares/auth package, providing a foundation for authentication within Palmares. It also includes the first authentication adapter, password-auth, for password-based authentication.

Key changes include:

@palmares/auth Package:

  • add changes here

libs/password-auth Package:

  • add changes here

examples/with-auth Base WebServer with Auth adapter:

  • add changes here

General Updates:

  • Disabled ts/no-namespace rule in the main eslint.config.js.
  • Added a build watch script for authentication packages in the main package.json.

THIS PR IS STILL IN DRAFT CUZ IT STILL IN DEVELOPMENT

@Vicentesan Vicentesan self-assigned this Feb 21, 2025
@changeset-bot
Copy link

changeset-bot bot commented Feb 21, 2025

🦋 Changeset detected

Latest commit: f3d1b28

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 21 packages
Name Type
@palmares/express-adapter Patch
@palmares/server Patch
@examples/basic Patch
@examples/bench Patch
@examples/deel-hometask-challenge Patch
mainpage Patch
@examples/server-palmares Patch
@examples/server-express-only Patch
@examples/with-auth Patch
@examples/with-code-share-server Patch
@tests/client Patch
@tests/schemas Patch
@tests/server Patch
@examples/next-client-app Patch
@examples/server-vercel Patch
@examples/with-code-share-client Patch
@palmares/schemas Patch
@palmares/vercel-adapter Patch
@examples/schemas Patch
@examples/with-code-share-shared Patch
@palmares/zod-schema Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added main Changing one of the core packages, take caution libs Changing one of the officially supported libs examples labels Feb 21, 2025
@Vicentesan
Copy link
Collaborator Author

We just decided that we won't use (for now) existent libs for JWT, so i'll remove the latest changes from the JWT Package and create one from scratch

@Vicentesan Vicentesan requested a review from Copilot March 31, 2025 13:20
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request introduces the @palmares/auth package along with the first password-based authentication adapter, and updates the base web server configuration and supporting scripts.

  • Introduces a new authentication package and adapter.
  • Sets up new database, core, and CLI components for authentication.
  • Updates ESLint and Drizzle configurations, and includes changesets for versioning.

Reviewed Changes

Copilot reviewed 48 out of 54 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
examples/with-auth/src/db/schemas/index.ts Exports user schema.
examples/with-auth/src/db/repositories/users.ts Implements repository functions for user data handling.
examples/with-auth/src/db/index.ts Configures the database and engine for Postgres.
examples/with-auth/src/core/index.ts Defines core functionalities including auth routes and migrations.
examples/with-auth/src/core/auth.ts Initializes auth; import path appears inconsistent with new package naming.
examples/with-auth/manage.ts Provides CLI command handling for the authentication example.
examples/with-auth/manage.drizzle.ts Provides CLI command handling for Drizzle.
examples/with-auth/eslint.config.js Updates ESLint configuration to disable the ts/no-namespace rule.
examples/with-auth/drizzle.config.ts Configures Drizzle migration settings.
examples/with-auth/docker-compose.yml Sets up docker-compose for the auth example environment.
examples/server-express-only/src/settings.ts Contains unresolved merge conflict markers.
eslint.config.js Updates main ESLint configuration.
.changeset/slow-hairs-mate.md Documents changes to @palmares/server.
.changeset/dull-hoops-punch.md Documents changes to @palmares/express-adapter and @palmares/server.
Files not reviewed (6)
  • examples/with-auth/drizzle/migrations/0000_initial_db_structure.sql: Language not supported
  • examples/with-auth/drizzle/migrations/meta/0000_snapshot.json: Language not supported
  • examples/with-auth/drizzle/migrations/meta/_journal.json: Language not supported
  • examples/with-auth/drizzle/schemas: Language not supported
  • examples/with-auth/package.json: Language not supported
  • examples/with-auth/priv/init-db.sh: Language not supported

Comment on lines +59 to +64
<<<<<<< HEAD
},
})
},
},
=======
Copy link

Copilot AI Mar 31, 2025

Choose a reason for hiding this comment

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

Unresolved merge conflict markers detected. Please resolve the conflict and remove all merge conflict markers.

Suggested change
<<<<<<< HEAD
},
})
},
},
=======

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

examples libs Changing one of the officially supported libs main Changing one of the core packages, take caution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants