AuraStack Auth

Contributing

Learn how to contribute to Aura Stack Auth

Thank you for considering contributing to Aura Stack Auth! It's people like you that make this project such a great tool for the community.

Code of Conduct

This project and everyone participating in it is governed by a code of conduct. By participating, you are expected to uphold this code. Please be respectful, inclusive, and considerate in all interactions.

Our Standards

  • Be respectful: Treat everyone with respect and kindness
  • Be inclusive: Welcome and support people of all backgrounds
  • Be constructive: Provide constructive feedback and be open to receiving it
  • Be collaborative: Work together towards common goals
  • Be patient: Remember that everyone has different skill levels and learning curves

Getting Started

Setting Up Your Development Environment

Fork the Repository

Go to the Aura Stack Auth repository and click the "Fork" button.

Clone Your Fork

git clone https://github.com/YOUR_USERNAME/auth.git
cd auth

Add Upstream Remote

git remote add upstream https://github.com/aura-stack-js/auth.git

Run Tests

pnpm test
If all tests pass, you're ready to start contributing! 🎉

How Can I Contribute?

Reporting Bugs

Before creating bug reports, please check the issue tracker as you might find that you don't need to create one.

When creating a bug report, include:

  • Clear and descriptive title
  • Exact steps to reproduce the problem
  • Specific examples to demonstrate the steps
  • Behavior you observed and what you expected
  • Screenshots or GIFs if applicable
  • Environment details: OS, Node.js version, package version

Your First Code Contribution

Unsure where to begin? Look for issues labeled:

  • good first issue - Issues that are good for newcomers
  • help wanted - Issues that need assistance

Pull Request Process

Create a New Branch

git checkout -b feature/your-feature-name

Use a descriptive branch name:

  • feature/ - New features
  • fix/ - Bug fixes
  • docs/ - Documentation changes
  • refactor/ - Code refactoring

Make Your Changes

Write your code, following the project's code style and conventions.

Write or Update Tests

Ensure your changes are covered by tests:

# Run tests
pnpm test

# Run tests with coverage
pnpm test:coverage

Format Your Code

pnpm format

Commit Your Changes

Follow the Conventional Commits specification:

git commit -m "feat(auth): add support for OAuth 2.0 PKCE flow"

Push to Your Fork

git push origin feature/your-feature-name

Open a Pull Request

Go to GitHub and open a Pull Request with:

  • Clear and descriptive title
  • Reference to related issues
  • Comprehensive description of changes
  • Screenshots or GIFs for UI changes (if applicable)

Pull Request Guidelines: - Use a clear and descriptive title - Reference any related issues in the description - Provide a comprehensive description of the changes - Ensure all tests pass - Keep pull requests focused on a single concern - Update documentation if needed

Development Workflow

Project Structure

auth/
├── packages/
│   ├── core/           # Main authentication library
│   │   ├── src/        # Source code
│   │   └── test/      # Tests
│   └── jose/           # JOSE utilities
│       ├── src/        # Source code
│       └── test/      # Tests
├── docs/               # Documentation site (Fumadocs)
├── apps/               # Example applications
└── turbo.json          # Turborepo configuration

Running Tests

# Run all tests
pnpm test

# Run tests in watch mode
pnpm test:watch

# Run tests with coverage
pnpm test:coverage

Code Style

We use Prettier for code formatting.

  • Format code: pnpm format
  • Check formatting: pnpm format:check

Guidelines

  • Use TypeScript for all new code
  • Write meaningful variable and function names
  • Add TsDoc comments for public APIs
  • Keep functions small and focused
  • Write tests for new features
  • Follow existing code patterns

Your contributions help make authentication easier and more secure for developers everywhere.