搜尋套件、儲存庫與 APP 分類

套件詳情v1.0.3

uaepass_api

用於認證API(登入、登出、取得使用者資料)的Flutter UAE PASS套件。

AndroidiOS
近 30 天下載
121
喜歡數
11
Pub 分數
150

安裝套件

flutter pub add uaepass_api

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

uaepass_api 包是一個 Flutter 插件,專為與阿聯酋 PASS 認證系統無縫整合而設計,讓開發者能在 Android 和 iOS 應用中實現登入、登出及使用者資料檢索功能。該套件透過利用 UAE PASS 的數位身分架構,簡化了對政府服務的安全存取。該套件處理認證流程與權杖管理,確保符合阿聯酋的數位身分標準。非常適合需要可信使用者驗證的公部門與企業應用。

適用情境

  • 政府服務應用
  • 企業身分整合
  • 安全的用戶登錄系統
  • 數位開戶工作流程
  • 行動應用程式驗證

主要特色

  • UAE PASS 登入支援
  • 使用者資料檢索
  • 安全的令牌處理
  • 跨平台相容性(Android 與 iOS)
  • 與 Flutter 的輕鬆整合

適合對象

  • 公共部門應用
  • 政府數位計畫
  • 安全的移動應用
  • 面向阿聯酋用戶的開發者
  • 需要eID認證的應用程式

使用建議

  • 需要設置阿聯酋PASS帳戶
  • 依賴外部API的可用性
  • 需要為生產環境進行正確設定
  • 僅限阿聯酋當地服務
  • 可能需要額外的合規檢查

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

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
  • Run flutter pub get
flutter pub get
  • 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);
  • Get user code
    String? code =  await uaePassAPI.signIn(context);
  • Get user AccessToken
    String? token =  await uaePassAPI.getAccessToken(code);
  • Get user info
    String? token =  await uaePassAPI.getUserProfile(token);
  • Logout
  await uaePassAPI.logout(context);

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>

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>

  • 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>

Note: incase kotlin error, add the following to your build.gradle file

buildscript {
    // update this line
    ext.kotlin_version = '1.7.10'

Read Common issues

所屬分類

依賴

依賴清單 4 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。