clerk_auth 0.0.8-beta copy "clerk_auth: ^0.0.8-beta" to clipboard
clerk_auth: ^0.0.8-beta copied to clipboard

Package that will allow you to authenticate and use Clerk from Dart code.

Official Clerk Dart SDK (Beta) #

Pub Version Pub Points chat on Discord documentation twitter

⚠️ The Clerk Flutter SDK is in Beta ⚠️ #

❗️ Breaking changes should be expected until the first stable release (1.0.0) ❗️

Clerk helps developers build user management. We provide streamlined user experiences for your users to sign up, sign in, and manage their profile from your Dart code.

Requirements #

  • Dart >= 3.0.0

Example Usage #

To use this package you will need to go to your Clerk Dashboard create an application and copy the public and publishable API keys into your project.

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();
}
copied to clipboard

For more details see Clerk Auth object

License #

This SDK is licensed under the MIT license found in the LICENSE file.

3
likes
140
points
1.14k
downloads

Publisher

verified publisherclerk.com

Weekly Downloads

2024.09.14 - 2025.03.29

Package that will allow you to authenticate and use Clerk from Dart code.

Homepage
Repository (GitHub)
View/report issues

Topics

#authentication

Documentation

API reference

License

MIT (license)

Dependencies

collection, http, json_annotation, logging, meta

More

Packages that depend on clerk_auth