Skip to content
pubscout

clerk_auth

0.0.18-beta, released 4 months ago by clerk.com

Dart SDK for Clerk authentication and user management.

$ flutter pub add clerk_auth
Source repository

What it does

Provides sign‑up, sign‑in, session handling and user profile management through Clerk's API. Includes session‑token polling and support for passkeys and organization data. Works across Android, iOS, macOS, Windows and Linux.

AI-written summary of version 0.0.18-beta, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need Clerk as your authentication backend
  • You want a single package handling sign‑in, sign‑up and session token streams
  • You require cross‑platform support without native SDKs

Skip it when

  • You need a stable, production‑ready SDK (still beta)
  • You prefer official provider SDKs like Firebase or Google Sign‑In
  • Your app only needs simple local biometrics

Strengths

  • Community‑maintained with frequent updates
  • Supports passkeys, session token streaming and organization metadata
  • Works on all major desktop and mobile platforms

Weaknesses

  • Beta status – breaking changes expected
  • Limited to Clerk backend only
  • Documentation still emerging

Setup

Kind
Pure Dart
Effort
Medium
Code generation
Yes (build_runner)
Direct dependencies
6

Add publishable key in AuthConfig, choose a Persistor (e.g., DefaultPersistor) and ensure a cache directory is provided for the platform.

import 'dart:io';
import 'package:clerk_auth/clerk_auth.dart';

Future<void> main() async {
  final auth = Auth(
    config: const AuthConfig(publishableKey: '<YOUR-PUBLISHABLE-KEY>'),
    persistor: DefaultPersistor(getCacheDirectory: () => Directory.current),
  );
  await auth.initialize();
  await auth.attemptSignIn(strategy: Strategy.password, identifier: '<USER-EMAIL>', password: '<PASSWORD>');
  print('Signed in as ${auth.user}');
  await auth.signOut();
  auth.terminate();
}

Alternatives

Packages that do the same job and could replace clerk_auth.

Works with

Packages commonly used together with clerk_auth: ones it builds on, ones built on it, and its own family.