gotrue 0.2.0 copy "gotrue: ^0.2.0" to clipboard
gotrue: ^0.2.0 copied to clipboard

outdated

A dart client library for the GoTrue API.

example/main.dart

import 'package:gotrue/gotrue.dart';

Future<bool> main(List<String> arguments) async {
  const gotrueUrl = 'http://localhost:9999';
  const annonToken = '';
  final client = GoTrueClient(
    url: gotrueUrl,
    headers: {
      'Authorization': 'Bearer $annonToken',
      'apikey': annonToken,
    },
  );

  final login = await client.signIn(
    email: 'email',
    password: '12345',
  );

  if (login.error == null) {
    print('Logged in, uid: ${login.data!.user!.id}');
  } else {
    print('Error!');
  }

  await client.signOut();
  print('Logged out!');
  return true;
}
12
likes
0
pub points
97%
popularity

Publisher

verified publishersupabase.io

A dart client library for the GoTrue API.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

http, jwt_decode

More

Packages that depend on gotrue