0 purchases
skillmine auth sdk
The skillmine_auth_sdk package enables seamless integration of authentication in Flutter applications. It facilitates handling OAuth2 flows, allowing developers to easily manage user authentication and token retrieval within their apps.
Prerequisites #
An existing Flutter project.
Internet permission in your AndroidManifest.xml file.
Support SDK
Android 21+
iOS 12.0+
How do I use auth-web package #
First define empty access token
late final accessToken;
copied to clipboard
By adding following code in on tap or directly to your scaffold body
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 21
}
}
copied to clipboard
Add the import of the implementation packages to your app or package
import 'package:skillmine_auth_sdk/skillmine_auth_sdk.dart';
copied to clipboard
Conclusion #
This guide has covered the basic steps to integrate and use the skillmine_auth_sdk Package in your Flutter app. For more advanced configurations and troubleshooting, contact Skillmine Technologies.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.