SDKs and installation
Schema-generated libraries for nine backend targets and five browser/mobile targets.
On this page
Find your language repository
Use the SDK repository catalog, which is generated from the target manifest.
Each language has a public repository under the AnyOAuth GitHub organization.
Follow its README or select a versioned GitHub release. Repositories contain source,
models, native tests, an MIT license and generation provenance. GitHub hosts all
source archives; the AnyOAuth website does not host SDK downloads. Source releases
do not imply publication to a package registry. The catalog lists verified registry
packages and version-pinned installation commands; Python and Ruby 0.1.0 are
published. Other registry packages are awaiting publication. Go and Swift use the
versioned GitHub tags directly.
Registry packages and GitHub v0.1.0 releases contain the initial SDK contract.
Newer clean-callback and login-session helpers in the current integration guides
require a subsequent SDK release; they are not included in those 0.1.0 packages.
Backend libraries
Node.js/TypeScript, Python, Go, PHP, Java, Ruby, .NET, Rust and Elixir implement the confidential exchange, profile, provider-status and revocation operations, plus local authorization and callback helpers. They use the same public wire contract.
Browser and mobile libraries
Browser TypeScript, Expo, Swift, Kotlin and Flutter/Dart create transactions, construct authorization URLs and validate callbacks. A confidential backend redeems the code.
import { AnyOAuth } from "@anyoauth/node";
const client = new AnyOAuth({
clientId: process.env.ANYOAUTH_CLIENT_ID ?? "YOUR_CLIENT_ID",
clientSecret: process.env.ANYOAUTH_CLIENT_SECRET ?? "YOUR_CLIENT_SECRET",
baseUrl: process.env.ANYOAUTH_API_ORIGIN ?? "https://api.anyoauth.com",
});
const transaction = await client.createTransaction();
@anyoauth/node on GitHubConfidential backend SDK
// Supply these public settings from your app configuration.
const settings = globalThis.ANYOAUTH_SETTINGS ?? {};
import { AnyOAuth } from "@anyoauth/client";
const client = new AnyOAuth({
clientId: settings.ANYOAUTH_CLIENT_ID ?? "YOUR_CLIENT_ID",
baseUrl: settings.ANYOAUTH_API_ORIGIN ?? "https://api.anyoauth.com",
});
const transaction = await client.createTransaction();
@anyoauth/client on GitHubClient helpers · backend exchange required
// Supply these public settings from your app configuration.
const settings = globalThis.ANYOAUTH_SETTINGS ?? {};
import { AnyOAuth } from "@anyoauth/expo/native";
import * as Crypto from 'expo-crypto';
const client = new AnyOAuth({
crypto: Crypto,
clientId: settings.ANYOAUTH_CLIENT_ID ?? "YOUR_CLIENT_ID",
baseUrl: settings.ANYOAUTH_API_ORIGIN ?? "https://api.anyoauth.com",
});
const transaction = await client.createTransaction();
@anyoauth/expo on GitHubClient helpers · backend exchange required
import os
from anyoauth import Client
client = Client(os.getenv("ANYOAUTH_CLIENT_ID", "YOUR_CLIENT_ID"), os.getenv("ANYOAUTH_CLIENT_SECRET", "YOUR_CLIENT_SECRET"), os.getenv("ANYOAUTH_API_ORIGIN", "https://api.anyoauth.com"))
transaction = client.create_transaction()
anyoauth-sdk on GitHubConfidential backend SDK
package main
import (
"os"
anyoauth "github.com/AnyOAuth/anyoauth-go"
)
func env(key, fallback string) string { if v := os.Getenv(key); v != "" { return v }; return fallback }
func main() {
transaction, err := anyoauth.CreateTransaction()
if err != nil { panic(err) }
_ = transaction
}
github.com/AnyOAuth/anyoauth-go on GitHubConfidential backend SDK
<?php
require 'vendor/autoload.php';
$client = new \AnyOAuth\Client((getenv("ANYOAUTH_CLIENT_ID") ?: "YOUR_CLIENT_ID"), (getenv("ANYOAUTH_CLIENT_SECRET") ?: "YOUR_CLIENT_SECRET"), (getenv("ANYOAUTH_API_ORIGIN") ?: "https://api.anyoauth.com"));
$transaction = $client->createTransaction();
anyoauth/anyoauth on GitHubConfidential backend SDK
import com.anyoauth.AnyOAuth;
import com.google.gson.*;
public class Example {
static String env(String key, String fallback) { String value = System.getenv(key); return value == null ? fallback : value; }
public static void main(String[] args) {
var transaction = AnyOAuth.createTransaction();
}
}
com.anyoauth:anyoauth on GitHubConfidential backend SDK
require "anyoauth"
client = AnyOAuth::Client.new(ENV.fetch("ANYOAUTH_CLIENT_ID", "YOUR_CLIENT_ID"), ENV.fetch("ANYOAUTH_CLIENT_SECRET", "YOUR_CLIENT_SECRET"), ENV.fetch("ANYOAUTH_API_ORIGIN", "https://api.anyoauth.com"))
transaction = client.create_transaction()
anyoauth-sdk on GitHubConfidential backend SDK
using System;
using System.Text.Json.Nodes;
using AnyOAuth;
var transaction = Client.CreateTransaction();
AnyOAuth.SDK on GitHubConfidential backend SDK
use anyoauth_sdk::*;
use serde_json::json;
fn env(key: &str, fallback: &str) -> String { std::env::var(key).unwrap_or_else(|_| fallback.to_owned()) }
fn main() -> Result<(), Box<dyn std::error::Error>> {
let transaction = create_transaction()?;
let _ = &transaction;
Ok(())
}
anyoauth-sdk on GitHubConfidential backend SDK
client = AnyOAuth.new((System.get_env("ANYOAUTH_CLIENT_ID") || "YOUR_CLIENT_ID"), (System.get_env("ANYOAUTH_CLIENT_SECRET") || "YOUR_CLIENT_SECRET"), (System.get_env("ANYOAUTH_API_ORIGIN") || "https://api.anyoauth.com"))
transaction = AnyOAuth.create_transaction(client)
anyoauth_sdk on GitHubConfidential backend SDK
import Foundation
import AnyOAuth
func env(_ key: String, _ fallback: String) -> String { ProcessInfo.processInfo.environment[key] ?? fallback }
let client = try AnyOAuth(clientId: env("ANYOAUTH_CLIENT_ID", "YOUR_CLIENT_ID"), baseUrl: env("ANYOAUTH_API_ORIGIN", "https://api.anyoauth.com"))
let transaction = try client.createTransaction()
AnyOAuth on GitHubClient helpers · backend exchange required
import com.anyoauth.*
fun env(key: String, fallback: String): String = System.getenv(key) ?: fallback
fun main() {
val client = AnyOAuth(env("ANYOAUTH_CLIENT_ID", "YOUR_CLIENT_ID"), env("ANYOAUTH_API_ORIGIN", "https://api.anyoauth.com"))
val transaction = client.createTransaction()
}
com.anyoauth:anyoauth-client on GitHubClient helpers · backend exchange required
import 'dart:io';
import 'package:anyoauth_client/anyoauth_client.dart';
String env(String key, String fallback) => Platform.environment[key] ?? fallback;
void main() {
final client = AnyOAuth(clientId: env("ANYOAUTH_CLIENT_ID", "YOUR_CLIENT_ID"), baseUrl: env("ANYOAUTH_API_ORIGIN", "https://api.anyoauth.com"));
final transaction = client.createTransaction();
}
anyoauth_client on GitHubClient helpers · backend exchange required
Expo crypto
Install your Expo SDK’s compatible expo-crypto package with npx expo install expo-crypto.
Use the native entry @anyoauth/expo/native and provide that crypto module to the client.
It does not require Web Crypto in Hermes and does not fall back to insecure randomness.
Verify the package
GitHub releases publish SHA-256 checksums. Each repository’s README explains its local build and conformance commands. Test adapters use dummy credentials and local fixtures; do not put production credentials in a test log or fixture.