sabowsla_auth 0.0.1 copy "sabowsla_auth: ^0.0.1" to clipboard
sabowsla_auth: ^0.0.1 copied to clipboard

A dart client library for the sabowsla_auth API.

example/main.dart

import 'package:sabowsla_auth/sabowsla_auth.dart';
import 'package:sabowsla_auth/src/sabowsla_auth.dart';

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

  try {
    final login = await client.signInWithPassword(
      email: 'email',
      password: '12345',
    );
    print('Logged in, uid: ${login.session!.user.id}');
  } on AuthException catch (error) {
    print('Sign in Error: ${error.message}');
  }

  await client.signOut();
  print('Logged out!');
  return true;
}
0
likes
0
points
132
downloads

Publisher

unverified uploader

Weekly Downloads

A dart client library for the sabowsla_auth API.

Homepage
Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (license)

Dependencies

collection, crypto, http, jwt_decode, meta, rxdart

More

Packages that depend on sabowsla_auth