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.

example/main.dart

// ignore_for_file: avoid_print

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
3
likes
140
points
1.15k
downloads

Publisher

verified publisherclerk.com

Weekly Downloads

2024.09.16 - 2025.03.31

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