Skip to Content
SDKsOverview

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/nextjsauris-goauris-pythonauris-rustauris/sdk (PHP)auris-sso (WP)@auris/cli@auris/mcp@auris/aiAuris.NET (C#)AurisKit (Swift)
AuthenticationYesYesYesYesYesYesYesYesN/AN/AN/ALicensing onlyLicensing only
OAuth2 PKCEYesYesYesYesYesYesYesYesN/AN/AN/ANoNo
Social LoginYesYesYesNoNoNoNoNoN/AN/AN/ANoNo
Magic LinksYesYesYesNoNoNoNoNoN/AN/AN/ANoNo
SMS OTPYesYesYesNoNoNoNoNoN/AN/AN/ANoNo
Permissions checkYesYes (hooks)Yes (server)YesYesYesNoNoNoNoNoNoNo
Fine-Grained AuthorizationYesYes (hooks)Yes (server)NoNoNoNoNoNoNoNoNoNo
Management APIYesNoYes (server)YesYesYesNoNoYesYesNoNoNo
Licensing / EntitlementsYesNoYes (server)YesYesYesNoNoNoNoNoYesYes
Webhook verificationYesNoNoNoNoNoNoNoNoNoNoNoNo
JWT verificationYesNoYes (server)YesYesYesNoNoNoNoNoNoNo
AI agent toolsNoNoNoNoNoNoNoNoNoYesYesNoNo
SSR supportYesNoYesYesYesYesYesN/AN/AN/AN/AN/AN/A
Edge runtimeYesNoYes (middleware)NoNoNoNoN/AN/AN/AN/AN/AN/A
Zero dependenciesYesNoNoYesYesYesYesNoNoNoNoYesYes

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/cli

The 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

PackageMin Node.jsMin GoMin PythonMin RustMin PHPMin WordPressMin .NETMin Swift
@auris/js18.0N/AN/AN/AN/AN/AN/AN/A
@auris/react18.0N/AN/AN/AN/AN/AN/AN/A
@auris/nextjs18.0N/AN/AN/AN/AN/AN/AN/A
@auris/mcp18.0N/AN/AN/AN/AN/AN/AN/A
@auris/ai18.0N/AN/AN/AN/AN/AN/AN/A
auris-goN/A1.21N/AN/AN/AN/AN/AN/A
auris-pythonN/AN/A3.10N/AN/AN/AN/AN/A
auris-rustN/AN/AN/A1.70N/AN/AN/AN/A
auris/sdkN/AN/AN/AN/A7.4N/AN/AN/A
auris-ssoN/AN/AN/AN/A7.45.0N/AN/A
@auris/cli18.0N/AN/AN/AN/AN/AN/AN/A
Auris.NETN/AN/AN/AN/AN/AN/A6.0N/A
AurisKitN/AN/AN/AN/AN/AN/AN/A5.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 SDK

React bindings built on top of @auris/js. AurisProvider context, hooks (useAuris, useUser, usePermissions, useFga, useOrganization), and components (AuthGuard, PermissionGate, LoginButton).

React SDK

Full 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 SDK

Expose 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 Server

Vercel AI SDK integration with built-in Auris context injection, user-aware prompt helpers, and streaming-compatible session management for AI-powered applications.

AI SDK

Pure PHP OAuth2 PKCE implementation for PHP 7.4+ with no external dependencies. Includes vanilla PHP examples and a Laravel integration guide.

PHP SDK

SSO plugin for WordPress with just-in-time user provisioning, configurable role mapping, and a login button shortcode. Requires the PHP SDK.

WordPress Plugin

Command-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)