Skip to main content

nhost_auth_dart 2.7.0 copy "nhost_auth_dart: ^2.7.0" to clipboard
nhost_auth_dart: ^2.7.0 copied to clipboard

Dart client for Nhost Auth with email/password, passwordless, MFA, anonymous sign-in, and session management.

Nhost Functions Dart SDK #

Pub nhost_dart tests

Nhost Functions API for Dart

Getting Started #

Get your subdomain and region from nhost dashboard

import 'package:nhost_auth_dart/nhost_auth_dart.dart';

void main() async {
  // Setup
  final auth = NhostAuthClient(url: authUrl);

  try {
    await auth.signInEmailPassword(
      email: 'user-1@nhost.io',
      password: 'password-1',
    );
    // Print out a few details about the current user
    final currentUser = auth.currentUser;
    if (currentUser != null) {
      print('currentUser.id: ${currentUser.id}');
      print('currentUser.displayName: ${currentUser.displayName}');
      print('currentUser.email: ${currentUser.email}');
      // And logout
      await auth.signOut();
    }
  } catch (e) {
    print(e);
  }

  // Release
  auth.close();
}

Latest Release #

dependencies:
  nhost_auth_dart: ^2.6.1
1
likes
160
points
714
downloads

Documentation

API reference

Publisher

verified publishernhost.io

Weekly Downloads

Dart client for Nhost Auth with email/password, passwordless, MFA, anonymous sign-in, and session management.

Homepage
Repository (GitHub)
View/report issues
Contributing

License

MIT (license)

Dependencies

http, http_parser, logging, meta, nhost_sdk

More

Packages that depend on nhost_auth_dart