搜索插件、代码仓与 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 项

源码仓库

使用此插件的项目

暂无相关数据。