0 purchases
auth webview sdk
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:
First define empty access token
late final accessToken;
copied to clipboard
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()));
}
},
)));
copied to clipboard
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
}
}
copied to clipboard
Add the import of the implementation packages to your app or package
import 'package:auth_webview_sdk/auth_webview_sdk.dart';
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.