flutter_canpass_login

A Flutter package that enhance CANPass login sdk

Features: login with canpass account, get email from account

Supported Android, Ios

Init:

await FlutterCanPassLogin.getInstance().init(
    secret: "[YOUR_SECRET_ID]",
    identifier: "[YOUR_CLIENT_ID]");

Functions:

login:

return the canpass account object

    final account = await FlutterCanPassLogin.getInstance().logIn(context);
logOut:

clear the accesstoken

    FlutterCanPassLogin.getInstance().logOut();
getCurrentToken:

return current accesstoken

    FlutterCanPassLogin.getInstance().getCurrentToken();
getCurrentAccount:

return current account from given token

    FlutterCanPassLogin.getInstance().getCurrentAccount(accesstoken);
to get secret key

go to https://developer.canpass.me/, create an app and then create OAuth2 clients

demo

https://drive.google.com/file/d/1uNKeNt7GaD1lEt8NUxdwfjXqm716o1yF/view?usp=sharing

Libraries

can_pass_account
constants
flutter_canpass_login
utls
webview