flutter_uae_pass

Creator: coderz1093

Last updated:

Add to Cart

Description:

flutter uae pass

uae_pass #
Un-official UAE Pass Flutter plugin for Android and iOS.

Getting Started #

Add the plugin to your pubspec.yaml file

flutter_uae_pass: ^0.0.1
copied to clipboard

Run flutter pub get

flutter pub get
copied to clipboard

Import the package

import 'package:flutter_uae_pass/uae_pass.dart';
final _uaePassPlugin = UaePass();


copied to clipboard

Initialize the plugin - Sandbox

await _uaePassPlugin.setUpSandbox();
copied to clipboard

Initialize the plugin - Production

await _uaePassPlugin.setUpEnvironment(
clientId: "<clientId>",
clientSecret: "<clientSecret>",
urlScheme: "myappscheme",
redirectUri: "<redirectUri>",
isProduction: true,

);
copied to clipboard
Scopes are as follows #

urn:uae:digitalid:profile:general
urn:uae:digitalid:profile

Main features #

signIn()
getAccessToken(String authCode)
getProfile(String token)
signOut()

Call the authenticate method #
String? authCode = await _uaePassPlugin.signIn();
copied to clipboard
To get access token #
String? accessToken = await _uaePassPlugin.getAccessToken(authCode);
copied to clipboard
To get public profile data #
you can fetch this information from profile

idn
email
firstnameAR
firstnameEN
fullnameEN
gender
lastnameAR
lastnameEN
mobile
nationalityAR
nationalityEN
sub
userType
uuid

ProfileData? profileData = await _uaePassPlugin.getProfile(accessToken);
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>myappscheme</string>
<key>CFBundleURLSchemes</key>
<array>
<string>myappscheme</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"
.....

</activity>

copied to clipboard

Set up the queries in your AndroidManifest.xml file (To make our app open UAE Pass App)

<queries>
<package android:name="ae.uaepass.mainapp" />
<package android:name="ae.uaepass.mainapp.qa" />
<package android:name="ae.uaepass.mainapp.stg" />
</queries>

copied to clipboard

Set up the intent filter in your AndroidManifest.xml file (To Reopen our application after uaepass done)

<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="myappscheme" />

<data
android:host="failure"
android:scheme="myappscheme" />

</intent-filter>

copied to clipboard
References #

Documentation
Read Common issues
Staging Apps

Thanks for Faisal for this repo uae_pass_flutter i improve the code and create this package

License

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

Files:

Customer Reviews

There are no reviews.