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

套件詳情v0.0.3

okta_oidc

一個用於 Okta OIDC 身份驗證的 Flutter 插件,可使用 Okta 服務透過 OpenID Connect 實現安全的使用者登入、權杖管理與身分整合。

AndroidiOS
近 30 天下載
3220
喜歡數
7
Pub 分數
140

安裝套件

flutter pub add okta_oidc

套件介紹

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

okta_oidc 套件是一個 Flutter 插件,可利用 Okta 服務透過 OpenID Connect 實現安全驗證。它能在 Android 與 iOS 平台上實現無縫使用者登入、權杖管理與身分整合。專為希望將 Okta 的身分解決方案整合至 Flutter 應用的開發者設計,該套件安全地處理 OAuth 2.0 流程、權杖儲存與會話管理。此套件簡化了現代驗證流程的實作,確保符合產業標準。在需要強大身分驗證與存取控管之企業應用中尤為實用。

適用情境

  • 企業應用驗證
  • 單點登入(SSO)整合
  • 使用 Okta 實現安全的使用者登入
  • 基於令牌的授權
  • 行動應用程式身分管理

主要特色

  • OpenID Connect 支援
  • 安全的令牌處理
  • 跨平台(Android 與 iOS)
  • Okta 服務整合
  • 會話管理

適合對象

  • 企業移動應用
  • 需要 SSO 的應用
  • 使用 Okta 身份服務的開發人員
  • 認證密集型應用
  • Flutter 應用需要安全登入

使用建議

  • 需要設定 Okta 帳戶
  • 需要正確配置重定向 URI
  • 依賴於平台特定的 OAuth 處理
  • 僅限 Okta OIDC 提供者
  • 可能需要額外的後端驗證

原始 README

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

okta_oidc

okta_oidc provide simple authentication integration in mobile apps.

Sample

Check out sample app Okta oidc

Installation

To add okta_oidc to your flutter application install instructions. Below are some Android and iOS specifics that are required for the okta_oidc to work correctly.

Android
  1. Make sure you set the minSdkVersion 21 or above in your "android/app/build.gradle"
android {
  minSdkVersion 21

  ...
}
  1. Similar to the sample app, you must add a redirect scheme to receive sign in results from the web browser. To do this, you must define a gradle manifest placeholder in your app's build.gradle:
manifestPlaceholders = [
    appAuthRedirectScheme: 'Add redirect schema here...'
  ]
iOS
  1. Make sure the minimum deployment target in Podfile set to 13 or above
platform :ios, '13.0'

Add `assets/okta_config.json` file in root of your project with below data.
{
  "client_id": "",
  "redirect_uri": "",
  "end_session_redirect_uri": "",
  "scopes": [],
  "discovery_uri": ""
}

Example

Available Methods
initOkta

This method will initialize okta with config file or map data.

code
OktaOidc oktaOidc = OktaOidc();

...
...

 Future<void> initOkta() async {
    final String response =
        await rootBundle.loadString('assets/okta_config.json');
    Map<String, dynamic>? oktaConfig = jsonDecode(response);
    oktaOidc.initOkta(oktaConfig);
  }
login

This method will redirect you to okta sign in page and return response or error.

code
 oktaOidc.login().then((value) {
                }).catchError((onError) {
                });
socialLogin

This method can be used for social login like linked in, google and apple sign in. Need to provide idp and idp-scope for social sign in.

code
  oktaOidc.socialLogin({
      "idp": "Add idp here...",
      "idp-scope": "Add scope here..."
    }).then((value) {
    });
getAccessToken

This method will return access token if logged in if token is expired it will refresh the token.

code
  oktaOidc.getAccessToken();
getUserProfile

This method returns user profile data.

code
  oktaOidc.getUserProfile();
logout

This method clears the user session.

code
  oktaOidc.logout();

所屬分類

依賴

依賴清單 1 項

  • plugin_platform_interface^2.0.2

原始碼儲存庫

使用此套件的專案

暫無相關資料。