auth-js uses the runtime's global fetch to make HTTP requests, but an alternative fetch implementation can be provided as an option. This is useful in environments where the global fetch is unavailable or where you want to customize request behavior:
# Run main test suite with Supabase CLI (recommended)
pnpm nx test:auth auth-js
# Run Docker-only edge case tests
pnpm nx test:docker auth-js
# Run both test suites
pnpm nx test:auth auth-js && pnpm nx test:docker auth-js
Main Test Suite (Supabase CLI)
The test:auth command automatically:
Stops any existing Supabase instance
Starts a local Supabase instance via CLI
Runs the test suite (excludes docker-tests/ folder)
Cleans up after tests complete
# Individual commands for manual control
pnpm nx test:infra auth-js # Start Supabase CLI
pnpm nx test:suite auth-js # Run tests only
pnpm nx test:clean-post auth-js # Stop Supabase CLI
Docker Tests (Edge Cases)
The test:docker target runs tests that require specific GoTrue configurations not possible with a single Supabase CLI instance:
Signup disabled - Tests for disabled signup functionality
Asymmetric JWT (RS256) - Tests for RS256 JWT verification
Firebase is a comprehensive app development platform that includes authentication services. It supports email/password authentication, social logins, and more. Compared to @supabase/auth-js, Firebase offers a broader range of services beyond authentication, such as real-time databases, cloud functions, and analytics.
Auth0 is a flexible, drop-in solution to add authentication and authorization services to your applications. It supports various authentication methods, including social logins, enterprise logins, and multi-factor authentication. Compared to @supabase/auth-js, Auth0 provides more advanced features and integrations but can be more complex to set up and manage.
NextAuth.js is a complete open-source authentication solution for Next.js applications. It supports various authentication methods, including email/password, OAuth providers, and more. Compared to @supabase/auth-js, NextAuth.js is specifically designed for Next.js and offers seamless integration with it, while @supabase/auth-js can be used with any JavaScript framework.
The npm package @supabase/auth-js receives a total of 16,725,936 weekly downloads. As such, @supabase/auth-js popularity was classified as popular.
We found that @supabase/auth-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 2 open source maintainers collaborating on the project.
Package last updated on 14 Jul 2026
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
The White House’s Gold Eagle Initiative aims to coordinate AI-discovered vulnerabilities, validate findings, and accelerate patching across critical software.