appstitch_auth 1.0.0
appstitch_auth: ^1.0.0 copied to clipboard

An authentication library for flutter apps.

Appstitch Auth #

The most straight forward way to integrate user authentication into your flutter app

Platforms #

  • iOS
  • Android
  • Web

Usage #

Sign Up #


void signUp() async {
    final authOptions = AuthOptions(
        email: "test@example.com",
        );


    final result = await auth
        .signUp(authOptions);

    if (result.success!) {
        // Let user knows they will recieve an email/SMS with a authentication code
    } else {
        // handle error
    }
}

Sign In #

void signUp() async {
    final authOptions = AuthOptions(
        email: "test@example.com",
        );


    final result = await auth
        .signIn(authOptions);

    if (result.success!) {
        // Let user knows they will recieve an email/SMS with a authentication code
    } else {
        // handle error
    }
}

Confirm User #

void confirmUser() async {
    final authOptions = AuthOptions(
        code : "ABC123",
        );


    final result = await auth
        .confirmUser(authOptions);

    if (result.success!) {
        // user authenticated
    } else {
        // handle error
    }
}

Install #

appstitch_core: ^2.0.0-nullsafety.5
appstitch_auth: ^1.0.0

Initialize #

import 'package:appstitch_core/options.dart';
import 'package:appstitch_core/core.dart';

Core core = Core();
Auth auth = Auth();

@override
void initState() {
  super.initState();

  final options = Options(appstitchKey, clientID: clientID);
  core.initialize(options);

}
0
likes
100
pub points
0%
popularity

Publisher

appstitch.dev

An authentication library for flutter apps.

Homepage

Documentation

API reference

License

BSD (LICENSE)

Dependencies

appstitch_core, flutter, json_annotation

More

Packages that depend on appstitch_auth