Choose Your Language

OAuth42 SDKs

Official SDKs for your favorite programming languages. Get started with OAuth42 authentication in minutes with our well-documented, type-safe libraries.

Quick Start

JavaScript / TypeScript

npm install @oauth42/sdk

import { OAuth42 } from '@oauth42/sdk';

const oauth = new OAuth42({
  clientId: 'your_client_id',
  redirectUri: 'http://localhost:3000/callback'
});

// Start authentication
await oauth.login();

Swift

// Add to Package.swift
dependencies: [
    .package(url: "https://github.com/oauth42/oauth42-swift", from: "1.0.0")
]

import OAuth42Swift

let client = OAuth42Client(
    clientId: "your_client_id",
    redirectURI: "myapp://callback",
    issuer: "https://oauth42.com"
)

let authURL = try await client.buildAuthorizationURL()

Python

pip install oauth42

from oauth42 import OAuth42Client

client = OAuth42Client(
    client_id='your_client_id',
    client_secret='your_client_secret',
    redirect_uri='http://localhost:8000/callback'
)

# Get authorization URL
auth_url = await client.get_authorization_url()

Common Features

🔐

PKCE Support

Built-in PKCE (S256) for enhanced security in public clients

🔄

Auto Token Refresh

Automatic token refresh before expiration

💾

Secure Storage

Platform-native secure storage for tokens

📝

TypeScript Types

Full type safety and IntelliSense support

Async/Await

Modern async patterns for all languages

📚

Rich Documentation

Comprehensive guides and API references

Need a Different Language?

Don't see an SDK for your language? You can use our REST API directly or let us know what language you'd like to see supported.