Last updated:
0 purchases
nhost auth dart
Nhost Functions Dart SDK #
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: '[email protected]',
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();
}
copied to clipboard
Latest Release #
dependencies:
nhost_auth_dart: ^2.0.0
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.