SDKs
- Written for
- + Written for
- Deprecated
- + Deprecated
- Applies to
- + Applies to
SDKs
Atlas ships official SDKs across the whole stack. Frontend SDKs use your publishable key (pk_...) and talk to the Frontend API; backend SDKs use your secret key (sk_...) and talk to the Backend API, plus verify session JWTs locally.
The lineup
Tier | SDKs |
|---|---|
Frontend (web) |
|
Backend |
|
Native mobile | Swift (iOS/macOS), Kotlin (Android), Flutter |
Every frontend SDK wraps the framework-agnostic @atlas/js client, so they all drive the same endpoints and can't diverge in what the server sees. Every backend SDK mirrors @atlas/backend namespace-for-namespace over the same 45 Backend API resource areas.
Frontend
@atlas/js — framework-agnostic
import { FapiClient, advance, initialFlow } from '@atlas/js';
const client = new FapiClient({ publishableKey: 'pk_live_…' });
let flow = initialFlow;
flow = await advance(client, flow, { identifier: 'ada@example.com' });
flow = await advance(client, flow, { strategy: 'password', password });@atlas/react
import { AtlasProvider, SignedIn, SignIn, UserButton, useUser } from '@atlas/react';
<AtlasProvider publishableKey="pk_live_…" frontendApi="https://accounts.yourapp.com">
<SignedIn><UserButton /></SignedIn>
</AtlasProvider>@atlas/nextjs
import { atlasMiddleware } from '@atlas/nextjs';
export default atlasMiddleware({
jwksUrl: 'https://accounts.yourapp.com/.well-known/jwks.json',
issuer: 'https://accounts.yourapp.com',
publicRoutes: ['/', '/sign-in(.*)'],
});@atlas/vue
import { createApp } from 'vue';
import { createAtlas } from '@atlas/vue';
createApp(App).use(createAtlas({ publishableKey: 'pk_live_…' })).mount('#app');
// then in components: const { isSignedIn, user } = useUser();@atlas/nuxt
// nuxt.config.ts
export default defineNuxtConfig({
modules: ['@atlas/nuxt'],
atlas: { publishableKey: 'pk_live_…', frontendApi: 'https://accounts.yourapp.com' },
});@atlas/angular
import { provideAtlas } from '@atlas/angular';
bootstrapApplication(AppComponent, {
providers: [provideAtlas({ publishableKey: 'pk_test_…' })],
});@atlas/svelte
<script lang="ts">
import { AtlasProvider } from '@atlas/svelte';
</script>
<AtlasProvider publishableKey="pk_live_…" frontendApi="https://accounts.yourapp.com">
<slot />
</AtlasProvider>@atlas/react-native
import { AtlasProvider } from '@atlas/react-native';
// React Native has no cookie jar — pass a TokenStorage adapter (e.g. expo-secure-store).
<AtlasProvider publishableKey="pk_live_…" storage={secureStorage}>{children}</AtlasProvider>Backend
@atlas/backend (Node)
import { AtlasBackend, createAtlasClient } from '@atlas/backend';
const atlas = createAtlasClient({ secretKey: 'sk_live_…' });
const user = await atlas.users.create({ email_address: 'ada@example.com' });Python — atlas-backend
from atlas_backend import AtlasClient
atlas = AtlasClient("sk_live_...")
user = atlas.users.create({"email_address": "ada@example.com"})Go — atlas-go
import atlas "github.com/atlas-auth/atlas-go"
// client over the sk_ Backend API; std-lib only, context-first methods.Ruby — atlas-auth
require "atlas"
atlas = Atlas::Client.new(ENV.fetch("ATLAS_SECRET_KEY"))
user = atlas.users.create(email_address: "ada@example.com")PHP — atlas-auth/atlas-php
use Atlas\Client;
$atlas = new Client('sk_live_…');
$user = $atlas->users->get('user_123');Java — net.atlasauth:atlas-java
AtlasClient atlas = AtlasClient.builder().secretKey("sk_live_…").build();
// plus SessionVerifier for local JWT verification.NET — Atlas.Sdk
using var atlas = new AtlasClient("sk_live_...");
User user = await atlas.Users.GetAsync("user_123");Native mobile
These are client SDKs — they use a publishable key and talk to the Frontend API, mirroring @atlas/js shape-for-shape.
Swift
import Atlas
let atlas = AtlasClient(publishableKey: "pk_live_…", frontendApi: "accounts.your-domain.com")
let user = try await atlas.signIn(email: "ada@example.com", password: "…")Kotlin / Android
// net.atlasauth:atlas-android — OkHttp + coroutines, mirrors the Swift SDK.
val atlas = AtlasClient(publishableKey = "pk_live_…", frontendApi = "accounts.your-domain.com")Flutter / Dart — atlas_auth
final client = AtlasClient(publishableKey: 'pk_live_…', frontendApi: 'accounts.example.com');
final user = await client.signIn(email: 'ada@example.com', password: '…');