Getting started

Add dependency

in your pubspec.yaml, add the following dependency:

authing_sdk: ^1.0.0

SDK initialization

Upon App start, call:

import 'package:authing_sdk/authing.dart';

Authing.init("user_pool_id", "app_id");

where user_pool_id is your Authing user pool id and app_id is your Authing app id

On-premise deployment

for on-premise deployments, after calling init, call:

Authing.setOnPremiseInfo(String host, String publicKey)

where host is your own domain, e.g. mycompany.com and publicKey is your organization's public key.

Contact Authing sales if you have any questions.


Authentication API

for all authentication APIs, you should import:

import 'package:authing_sdk/client.dart';

login by account and password

AuthResult result = await AuthClient.loginByAccount("your account", "your password");
User user = result.user; // get user info

Note: account can be one of username, phone number or email