Skip to content

feat(core): set up @aura-stack/auth monorepo#1

Merged
halvaradop merged 3 commits intomasterfrom
feat/set-up-auth-monorepo
Oct 27, 2025
Merged

feat(core): set up @aura-stack/auth monorepo#1
halvaradop merged 3 commits intomasterfrom
feat/set-up-auth-monorepo

Conversation

@halvaradop
Copy link
Copy Markdown
Member

@halvaradop halvaradop commented Oct 26, 2025

Description

This pull request sets up and introduces the main features and codebase for the @aura-stack/auth authentication library for TypeScript applications.
These changes include the setup of the core packages @aura-stack/auth and @aura-stack/session, which together implement the foundational OAuth 2.0 workflow.
The library provides two main endpoints — /signIn/:oauth and /callback/:oauth — to handle user authentication and interaction with third-party services for secure access to defined resources.

Some parts of the codebase have been tested using Vitest.
Additionally, several shared configuration packages have been included for common tooling across the monorepo, such as TypeScript, Prettier, and Tsup.

Key Changes

  • Set up Turborepo for monorepo management.
  • Set up internal configuration packages:
    • @aura-stack/tsconfig
    • @aura-stack/tsup-config
    • @aura-stack/prettier-config
  • Set up @aura-stack/auth core package, managing /signIn/:oauth and /callback/:oauth endpoints.
  • Set up @aura-stack/session core package, handling cookies and JWT-based session management.
  • Created a Next.js demo app demonstrating the basic usage of the @aura-stack/auth package.
  • Set up Vitest for testing.

Project Structure

auth/
├── apps/
│    └── nextjs/                # Demo Next.js application showcasing @aura-stack/auth usage
├── configs/
│     └── prettier-config/ # Shared Prettier configuration package
│     └── tsup-config/      # Shared Tsup build configuration package
│     └── tsconfig/           # Shared TypeScript configuration package
├── packages/
│     └── core/                 # @aura-stack/auth core package implementing OAuth 2.0 endpoints
│    └──session/              # @aura-stack/session package for cookies and JWT session handling
├── package.json
├── pnpm-workspace.yaml
└── turbo.json

- add standard error using `error` and `error_description` body format
- add `setCookiesByNames` and `getCookiesByNames` helpers
- refactor `getUserInfo` function
- standardize Zod schemas
- add mock tests for callback functions
@halvaradop halvaradop merged commit 7afa95f into master Oct 27, 2025
@halvaradop halvaradop deleted the feat/set-up-auth-monorepo branch October 27, 2025 23:12
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.

1 participant