Skillmine Auth Flutter Webview SDK

Getting started

A Flutter plugin that provides a Skillmine auth widget.

Support SDK

  • Android 19+ or 20+
  • iOS12.0+

Usage

You can now display a WebView by:

  1. First define empty access token
late final accessToken;
  1. By adding following code in on tap or directly to your scaffold
             Navigator.push(
                 context,
                 MaterialPageRoute(
                     builder: (context) => AuthWebViewSdkClass(
                           baseUrl:
                               "https://nightly-accounts-api.complyment.com/",
                           clientId: "d1d90d96-de43-4ee8-9c0b-d3f17d50ec6b",
                           responseType: "token",
                           scope: "openid%20profile%20user_info_all&",
                           redirectUrl:
                               "https://nightly-accounts.complyment.com/profile/personal-detail",
                           onTokenReceived: (String token) {
                             accessToken = token;
                             debugPrint('Received token: $token');
                             if (accessToken != null) {
                               Navigator.pushReplacement(
                                   context,
                                   MaterialPageRoute(
                                       builder: (context) => SuccessScreen()));
                             }
                           },
                         )));

Make sure you have proper Base Url, client ID, Response Type, Scope and Redirect Url

Additional information

You should however make sure to set the correct minSdkVersion in android/app/build.gradle if it was previously lower than 19:

android {
    defaultConfig {
        minSdkVersion 19
    }
}

Add the import of the implementation packages to your app or package

import 'package:auth_webview_sdk/auth_webview_sdk.dart';

Libraries

auth_webview_sdk