Shadow SSO client for Flutter

pub package

A Flutter plugin to use the Shadow SSO API.

To learn more about Shadow SSO, please visit the Firebase website

Getting Started

To get started with Shadow SSO for Flutter, please see the documentation.

Usage

To use this plugin, please visit the Authentication Usage documentation

Issues and feedback

Please file specific issues, bugs, or feature requests in our issue tracker.

To contribute a change to this plugin, please review our contribution guide and open a pull request.

Features

The Shadow SSO Client capable of logging in with the Shadow SSO. The client library is using HTTP2 as the primary communication channel then falls back to HTTP1.1 + WebSocket when you will use it in the browser.

The Token refresh is automatized after a successful login, and the refresh token is beeing stored with shared_preferences to use it later.

Getting started

First initialize the client with default parameters:

final ShadowSSOClient _client = ShadowSSOClient();

Then you can use the client in your app with the default configuration! See the API documentation for more information!

Usage

// More examples will coming soon
    final ShadowSSOClient _client = ShadowSSOClient();

    _client
        .login(emailController.text, passwordController.text)
        .then((value) => {
            setState(() {
            showSnackBar(
                const SnackBar(
                content: Text('Login successful'),
                ),
            );

            _isLoading = false;
            })
        })
        .catchError((error, stackTrace) {
          // Handle the error here
          showSnackBar(const SnackBar(content: Text("Login failed")));
          setState(() {
            _isLoading = false;
          });
          // print("${error}, ${stackTrace}");
          return <void>{};
        });

Additional information

Additional information can be found in the GitHub repository, and the API documentation site at https://pilab.hu

Libraries

shadow_sso_client