SDKs & Libraries
Auris provides official client libraries for all major platforms and frameworks. Every SDK wraps the same underlying OAuth2 PKCE flow and REST API, with framework-specific conveniences added on top.
SDK Comparison
The table below summarizes which capabilities are available in each package.
| Feature | @auris/js | @auris/react | @auris/nextjs | auris-go | auris-python | auris-rust | auris/sdk (PHP) | auris-sso (WP) | @auris/cli | @auris/mcp | @auris/ai | Auris.NET (C#) | AurisKit (Swift) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Authentication | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | N/A | N/A | N/A | Licensing only | Licensing only |
| OAuth2 PKCE | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | N/A | N/A | N/A | No | No |
| Social Login | Yes | Yes | Yes | No | No | No | No | No | N/A | N/A | N/A | No | No |
| Magic Links | Yes | Yes | Yes | No | No | No | No | No | N/A | N/A | N/A | No | No |
| SMS OTP | Yes | Yes | Yes | No | No | No | No | No | N/A | N/A | N/A | No | No |
| Permissions check | Yes | Yes (hooks) | Yes (server) | Yes | Yes | Yes | No | No | No | No | No | No | No |
| Fine-Grained Authorization | Yes | Yes (hooks) | Yes (server) | No | No | No | No | No | No | No | No | No | No |
| Management API | Yes | No | Yes (server) | Yes | Yes | Yes | No | No | Yes | Yes | No | No | No |
| Licensing / Entitlements | Yes | No | Yes (server) | Yes | Yes | Yes | No | No | No | No | No | Yes | Yes |
| Webhook verification | Yes | No | No | No | No | No | No | No | No | No | No | No | No |
| JWT verification | Yes | No | Yes (server) | Yes | Yes | Yes | No | No | No | No | No | No | No |
| AI agent tools | No | No | No | No | No | No | No | No | No | Yes | Yes | No | No |
| SSR support | Yes | No | Yes | Yes | Yes | Yes | Yes | N/A | N/A | N/A | N/A | N/A | N/A |
| Edge runtime | Yes | No | Yes (middleware) | No | No | No | No | N/A | N/A | N/A | N/A | N/A | N/A |
| Zero dependencies | Yes | No | No | Yes | Yes | Yes | Yes | No | No | No | No | Yes | Yes |
Which SDK to Choose
Use this decision tree to select the right package for your project.
Building a browser Single Page Application (React, Vue, plain JS)?
Use @auris/js for framework-agnostic code, or @auris/react for React-specific hooks and components.
Building a Next.js application?
Use @auris/nextjs. It re-exports @auris/react for Client Components and adds server-side helpers for Server Components, Route Handlers, and Edge Middleware.
Building a PHP or Laravel application?
Use the auris/sdk Composer package. It is pure PHP with no external dependencies and supports PHP 7.4 and above.
Running a WordPress site?
Use the auris-sso WordPress plugin. It handles SSO login, just-in-time user provisioning, and role mapping through the WordPress admin UI.
Writing scripts, CI/CD pipelines, or automating tenant management?
Use @auris/cli. Install it globally and authenticate once — then use auris users list, auris logs, and other commands in your scripts.
Server-to-server API calls (no user involved)?
Use @auris/js with the getM2MToken() method, or createManagementClient() in @auris/nextjs/server. Both use the OAuth2 client_credentials grant.
Building a Go application?
Use the auris-go module. It supports full authentication, OAuth2 PKCE, permissions, and the management API with idiomatic Go interfaces.
Building a Python application?
Use the auris-python package. It provides authentication flows, permissions checks, and management API access with an async-first design.
Building a Rust application?
Use the auris-rust crate. It supports authentication, JWT verification, permissions, and the management API with an async Tokio-based client.
Building an AI agent or LLM tool integration?
Use @auris/mcp to expose Auris management capabilities as MCP tools, or @auris/ai for Vercel AI SDK integration with built-in prompt helpers and user-context injection.
Building a .NET or C# application?
Use Auris.NET (NuGet). It is focused on licensing and entitlement checks — ideal for desktop apps and server-side license enforcement.
Building a native iOS or macOS application?
Use AurisKit (Swift Package). It is focused on licensing and entitlement checks — ideal for App Store apps that need server-side license validation.
Installation
# JavaScript (browser, Node.js, edge runtimes)
npm install @auris/js
# React
npm install @auris/react @auris/js
# Next.js (includes React and JS packages)
npm install @auris/nextjs @auris/react @auris/js
# MCP Server
npm install @auris/mcp
# AI SDK integration
npm install @auris/ai
# PHP
composer require auris/sdk
# Go
go get github.com/auris-iam/auris-go
# Python
pip install auris-python
# Rust
# Add to Cargo.toml: auris-rust = "1"
# C# / .NET
dotnet add package Auris.NET
# Swift
# Add AurisKit via Swift Package Manager
# CLI (global install)
npm install -g @auris/cliThe WordPress plugin is distributed as a .zip file. Install it through Plugins → Add New → Upload Plugin in the WordPress admin.
Quick Start Examples
JavaScript
import { AurisClient } from '@auris/js'
const auris = new AurisClient({
domain: 'auth.yourdomain.com',
clientId: 'app_xxxxx',
redirectUri: 'http://localhost:3000/callback',
})
// Redirect the user to the hosted login page
await auris.loginWithRedirect()
// On your callback page, complete the flow
const result = await auris.handleRedirectCallback()
console.log(result.user)React
import { AurisProvider, useAuris } from '@auris/react'
function App() {
return (
<AurisProvider domain="auth.yourdomain.com" clientId="app_xxxxx">
<LoginButton />
</AurisProvider>
)
}
function LoginButton() {
const { loginWithRedirect, logout, isAuthenticated, user } = useAuris()
if (isAuthenticated) {
return <button onClick={() => logout()}>Sign out ({user.email})</button>
}
return <button onClick={loginWithRedirect}>Sign in</button>
}Next.js
// middleware.ts
import { aurisMiddleware } from '@auris/nextjs/middleware'
export default aurisMiddleware({
protectedPaths: ['/dashboard(.*)'],
loginUrl: '/auth/login',
})
// app/dashboard/page.tsx (Server Component)
import { getSession } from '@auris/nextjs/server'
import { redirect } from 'next/navigation'
export default async function DashboardPage() {
const session = await getSession()
if (!session) redirect('/auth/login')
return <h1>Welcome, {session.user.name}</h1>
}PHP
<?php
require 'vendor/autoload.php';
use Auris\AurisClient;
use Auris\AurisConfig;
$config = new AurisConfig(
domain: 'auth.yourdomain.com',
clientId: 'your-client-id',
redirectUri: 'https://yourapp.com/callback.php'
);
$auris = new AurisClient($config);
// login.php
session_start();
header('Location: ' . $auris->getLoginUrl());
exit;
// callback.php
session_start();
$result = $auris->handleCallback($_GET['code'], $_GET['state']);
$_SESSION['user'] = $result->getUser();Version Compatibility
| Package | Min Node.js | Min Go | Min Python | Min Rust | Min PHP | Min WordPress | Min .NET | Min Swift |
|---|---|---|---|---|---|---|---|---|
@auris/js | 18.0 | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
@auris/react | 18.0 | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
@auris/nextjs | 18.0 | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
@auris/mcp | 18.0 | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
@auris/ai | 18.0 | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
auris-go | N/A | 1.21 | N/A | N/A | N/A | N/A | N/A | N/A |
auris-python | N/A | N/A | 3.10 | N/A | N/A | N/A | N/A | N/A |
auris-rust | N/A | N/A | N/A | 1.70 | N/A | N/A | N/A | N/A |
auris/sdk | N/A | N/A | N/A | N/A | 7.4 | N/A | N/A | N/A |
auris-sso | N/A | N/A | N/A | N/A | 7.4 | 5.0 | N/A | N/A |
@auris/cli | 18.0 | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
Auris.NET | N/A | N/A | N/A | N/A | N/A | N/A | 6.0 | N/A |
AurisKit | N/A | N/A | N/A | N/A | N/A | N/A | N/A | 5.9 |
All JavaScript SDKs ship both ESM (import) and CJS (require) builds, plus TypeScript declaration files. They do not require a bundler — you can use them directly in Node.js or modern browsers that support ES modules.
All packages follow semantic versioning. Breaking API changes are only introduced in major version bumps and are documented in the changelog for each package.
SDK Pages
Zero-dependency SDK for browsers, Node.js, and edge runtimes. Full API reference including the AurisClient, permissions module, FGA module, management client, webhook verification, and JWT verification.
JavaScript SDKReact bindings built on top of @auris/js. AurisProvider context, hooks (useAuris, useUser, usePermissions, useFga, useOrganization), and components (AuthGuard, PermissionGate, LoginButton).
React SDKFull Next.js integration with three entry points: client-side (re-exports @auris/react), server-side helpers (getSession, withAuth, requirePermission), and Edge Middleware (aurisMiddleware).
Next.js SDKExpose Auris management capabilities as Model Context Protocol tools for AI agents and LLM-based workflows. Includes tools for users, roles, organizations, applications, and audit logs.
MCP ServerVercel AI SDK integration with built-in Auris context injection, user-aware prompt helpers, and streaming-compatible session management for AI-powered applications.
AI SDKPure PHP OAuth2 PKCE implementation for PHP 7.4+ with no external dependencies. Includes vanilla PHP examples and a Laravel integration guide.
PHP SDKSSO plugin for WordPress with just-in-time user provisioning, configurable role mapping, and a login button shortcode. Requires the PHP SDK.
WordPress PluginCommand-line tool for managing your Auris tenant. Authenticate once, then manage users, roles, applications, and audit logs from the terminal or CI/CD pipelines.
CLI Tool.NET 6+ NuGet package for server-side and desktop license enforcement. Validates entitlements against Auris Licensing with zero external dependencies.
C# SDK (Licensing only)Swift Package for iOS and macOS applications. Validates licenses and entitlements against Auris Licensing — suitable for App Store apps requiring server-side license checks.
Swift SDK (Licensing only)