Skip to main content

Clerk Changelog

Flutter SDK Public Beta

Category
SDK
Published

We're excited to announce the beta release of our official Flutter SDK, bringing Clerk's powerful authentication and user management capabilities to Flutter applications.

This release includes both frontend (clerk_flutter) and backend (clerk_backend_api, clerk_auth) packages, enabling developers to build secure, cross-platform applications with ease.

Key Features

  • Complete Authentication Flow: Sign up, sign in, and manage user profiles directly from your Flutter code
  • Organization Support: Full implementation of Clerk's organization features for managing multi-tenant applications
  • Cross-Platform Compatibility: Works seamlessly across iOS, Android, and web platforms
  • Type-Safe API: Built with Dart's strong typing system for better development experience
  • Secure Backend Integration: Separate backend package for secure server-side operations

Getting Started

Add the package to your pubspec.yaml:

dependencies:
  clerk_flutter: ^0.0.8-beta

Flutter Implementation

Here's an example for how to initialize Clerk in your Flutter app:

class ExampleApp extends StatelessWidget {
  const ExampleApp({super.key, required this.publishableKey});

  final String publishableKey;

  @override
  Widget build(BuildContext context) {
    return ClerkAuth(
      config: ClerkAuthConfig(publishableKey: publishableKey),
      child: MaterialApp(
        theme: ThemeData.light(),
        debugShowCheckedModeBanner: false,
        home: Scaffold(
          body: SafeArea(
            child: ClerkErrorListener(
              child: ClerkAuthBuilder(
                signedInBuilder: (context, authState) {
                  return const ClerkUserButton();
                },
                signedOutBuilder: (context, authState) {
                  return const ClerkAuthentication();
                },
              ),
            ),
          ),
        ),
      ),
    );
  }
}

Server-side Usage

The clerk_auth package also allows interaction with Clerk via dart on the server side, if necessary:

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: await DefaultPersistor.create(
      storageDirectory: 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();
}

Requirements

  • Flutter >= 3.10.0
  • Dart >= 3.0.0

Beta Status

This SDK is currently in beta. While we're confident in its functionality, we recommend:

  • Hard pinning to the patch version in your pubspec.yaml
  • Exercising caution before deploying to production
  • Testing thoroughly in your development environment

Feedback

We welcome your feedback during this beta period. Please share your thoughts, report issues, or suggest improvements on our GitHub repository.

Acknowledgments

Special thanks to DevAngels for their exceptional work in developing this SDK. Their expertise in Flutter development has been instrumental in bringing Clerk's authentication capabilities to the Flutter ecosystem.

Contributor
Jeff Escalante

Introducing a new email template when your users sign-in with an unrecognized device

Offer your users more peace of mind with email notifications for sign-ins from unfamiliar devices. This feature helps users identify potentially malicious activity and take action, such as revoking suspicious sessions.

How It Works

When a user signs in from an unrecognized device, Clerk sends an email notification to the account owner. The email includes essential details about the sign-in device, such as:

  • Device type
  • Operating system
  • IP address
  • Location
  • Sign-in method

Like all emails delivered by Clerk, you can customize the template in the Clerk Dashboard. And for supported instances, the email may also include a button to sign out from the unrecognized device immediately.

Get Started

New device sign-in emails are enabled by default for all new applications but are disabled by default for existing instances.

For more information, visit the Unauthorized Sign-In reference page in our docs.

Contributors
Giannis Katsanos
Nikos Polykandriotis

Introducing @clerk/agent-toolkit

Category
Product
Published

Add Clerk to your agentic workflows with our new agent toolkit.

We're excited to introduce our @clerk/agent-toolkit package, a new experimental package designed to integrate Clerk into your AI agent workflows. This toolkit empowers developers to build powerful agentic systems with support for managing users, user data, organizations, and more. It's designed to work seamlessly with frameworks like Vercel's AI SDK and LangChain.

Adding Clerk to your workflow is as simple as:

import { createClerkToolkit } from '@clerk/agent-toolkit/ai-sdk'
import { openai } from '@ai-sdk/openai'
import { streamText } from 'ai'
import { auth } from '@clerk/nextjs/server'

export async function POST(req: Request) {
  const { messages } = await req.json()

  // 1. Instantiate the toolkit
  const toolkit = await createClerkToolkit()

  const result = streamText({
    model: openai('gpt-4o'),
    messages,
    system: systemPrompt,
    // 2. Pass the tools to the model
    tools: toolkit.users(),
  })

  return result.toDataStreamResponse()
}

Running a local MCP server is just as easy:

npx -y @clerk/agent-toolkit -p local-mcp --secret-key sk_123

Key Features

  • Vercel AI SDK & LangChain support: First-class support for Vercel's AI SDK and LangChain, with framework-specific helpers for each.
  • Local MCP server support: The @clerk/agent-toolkit package comes with a standalone local MCP server so you can easily integrate Clerk with any MCP client such as Claude Desktop.
  • Session context injection: Easily inject session claims (userId, sessionId, orgId) into system prompts for contextual awareness.
  • Scoped helpers: Support for scoping actions to specific users or organizations to limit resource access.

Up Next

  • Openai SDK support (coming soon): We're actively working on adding support for the openai SDK. Stay tuned for updates!

Try it today

Install the package using your preferred package manager and start building today:

npm install @clerk/agent-toolkit

Check out our example repository and the package's documentation to learn more.

We'd love to hear from you as you build. Your feedback will help shape the future of Clerk and AI. Reach out to .

Contributor
Nikos Douvlis

Clerk as an OpenID Connect provider

Category
Product
Published

Use your Clerk instance as an OpenID Connect provider (OIDC).

Clerk now offers OpenID Connect (OIDC) support for your Clerk instance, making the authentication across third-party services even easier. This update provides greater flexibility, enhanced security, and more control over authentication flows.

What's New?

  • OpenID Connect (OIDC) support – Authenticate with external services using industry-standard protocols and ID Tokens.
  • OAuth application management in the Clerk Dashboard – Configure and manage your settings directly from one central place.
  • Support for multiple redirect URIs - Seamlessly handle different environments (development, production) without extra work.
  • Token introspection endpoint - Validate and inspect Access and Refresh tokens securely, ensuring better control over access management.
  • Improved authentication control – Support for none and login prompts, giving you finer control over user authentication.

Upgrade from the legacy OAuth 2.0 provider

For any Clerk application which already using the legacy OAuth 2.0 provider, migrating to take advantage of the new OpenID Connect (OIDC) compatible provider is a self-service process. Simply migrate directly from the Clerk Dashboard to utilize the new and improved functionality.

Try it today

Get started today by creating your first OAuth application, visiting the Clerk Dashboard.

To learn more visit our documentation page.

Contributors
Haris Chaniotakis
Konstantinos Pittas
Vaggelis Yfantis
Alexandros Ntitoras

Passkeys support for Expo

Category
SDK
Published

Enable seamless, passwordless authentication in your Expo apps with Passkeys.

We're excited to announce native Passkeys support for Clerk's Expo SDK.

Implementation

Adding Passkeys support to your Expo app is straightforward using the user.createPasskey() method from useUser() hook and the signIn.authenticateWithPasskey() method from useSignIn() hook.

Create a Passkey

const CreatePasskeyPage = () => {
  const { user } = useUser()

  const handlePasskeySignIn = async () => {
    if (!user) return
    try {
      return await user.createPasskey()
    } catch (e: any) {
      // Handle errors
    }
  }
}

Sign in with Passkey

const SignInWithPasskeyPage = () => {
  const { signIn } = useSignIn()

  const handlePasskeySignIn = async () => {
    try {
      const signInAttempt = await signIn?.authenticateWithPasskey({
        flow: 'discoverable',
      })

      if (signInAttempt?.status === 'complete') {
        await setActive({ session: signInAttempt.createdSessionId })
        router.push('/')
      } else {
        // Handle errors
      }
    } catch (err) {
      // Handle errors
    }
  }
}

Getting Started

To implement Passkeys in your Expo application:

  1. Enable Passkeys in your Clerk Dashboard
  2. Follow our Passkeys integration guide for detailed setup instructions

Platform Support

  • iOS 16.0 or later
  • Android 9+ or later

Visit our documentation to learn more about implementing Passkeys in your Expo application.

Contributors
Alexandros Ntitoras
Nikos Polykandriotis
Nikos Papageorgiou

SAML Native Flows

Category
SSO
Published

Introducing SAML Native Flows for Expo and iOS SDKs, enabling secure enterprise authentication directly within your mobile apps

We're excited to announce support for SAML on both Expo and iOS SDKs.

Visit our documentation for step-by-step integration guides with @clerk/expo or iOS

Contributors
Mike Pitre
Nicolas Lopes
Laura Beatris