Official Clerk Dart SDK (Beta)
⚠️ 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();
}
For more details see Clerk Auth object
License
This SDK is licensed under the MIT license found in the LICENSE file.
Libraries
- clerk_auth
- Package that will allow you to authenticate and use Clerk from Dart code.