auth-js uses the cross-fetch library to make HTTP requests, but an alternative fetch implementation can be provided as an option. This is most useful in environments where cross-fetch is not compatible, for instance Cloudflare Workers:
# Run main test suite with Supabase CLI (recommended)
npx nx test:auth auth-js
# Run Docker-only edge case tests
npx nx test:docker auth-js
# Run both test suites
npx nx test:auth auth-js && npx 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
npx nx test:infra auth-js # Start Supabase CLI
npx nx test:suite auth-js # Run tests only
npx 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 8,775,711 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 14 open source maintainers collaborating on the project.
Package last updated on 24 Feb 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.
Since January 31, 2026, we identified at least 72 additional malicious Open VSX extensions, including transitive GlassWorm loader extensions targeting developers.
Six malicious Packagist packages posing as OphimCMS themes contain trojanized jQuery that exfiltrates URLs, injects ads, and loads FUNNULL-linked redirects.
The GCVE initiative operated by CIRCL has officially opened its publishing ecosystem, letting organizations issue and share vulnerability identifiers without routing through a central authority.