uaepass_api

Creator: coderz1093

Last updated:

0 purchases

uaepass_api Image
uaepass_api Images

Languages

Categories

Add to Cart

Description:

uaepass api

uaepass_api #
Un-official UAE PASS Flutter package for authentication capability.
Why uaepass_api? #

🚀 Easy to use
⚡ Fullscreen window
❤ Supports app installed scenario
❤ Supports app not installed scenario
🛡️ Null safety

Getting Started #

Add the plugin to your pubspec.yaml file

uaepass_api: ^1.0.3
copied to clipboard

Run flutter pub get

flutter pub get
copied to clipboard

Import the package

import 'package:uaepass_api/uaepass_api.dart';

UaePassAPI uaePassAPI =UaePassAPI(
clientId: "<clientId>",
redirectUri: "<redirectUri>",
clientSecrete: "<clientSecrete>",
appScheme: "<Your App Scheme>",
language: "en",
isProduction: false);
copied to clipboard

Get user code

String? code = await uaePassAPI.signIn(context);
copied to clipboard

Get user AccessToken

String? token = await uaePassAPI.getAccessToken(code);
copied to clipboard

Get user info

String? token = await uaePassAPI.getUserProfile(token);
copied to clipboard

Logout

await uaePassAPI.logout(context);
copied to clipboard
iOS Setup #

Add the following to your Info.plist file

<key>LSApplicationQueriesSchemes</key>
<array>
<string>uaepass</string>
<string>uaepassqa</string>
<string>uaepassdev</string>
<string>uaepassstg</string>
</array>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>You App URL Scheme here</string>
<key>CFBundleURLSchemes</key>
<array>
<string>You App URL Scheme here</string>
</array>
</dict>
</array>
copied to clipboard
Android Setup #

Update android:launchMode="singleTask" the AndroidManifest.xml file


<activity
android:name=".MainActivity"
android:exported="true"

android:launchMode="singleTask"

android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
.....

</activity>

copied to clipboard

Set up the intent filter in your AndroidManifest.xml file

<intent-filter >
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />


<data
android:host="success"
android:scheme="<Your App Scheme>" />

<data
android:host="failure"
android:scheme="<Your App Scheme>" />

</intent-filter>

copied to clipboard
Note: incase kotlin error, add the following to your build.gradle file
buildscript {
// update this line
ext.kotlin_version = '1.7.10'
copied to clipboard
Read Common issues

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.