Search packages, repositories and app categories

Package detailsv0.0.3

okta_oidc

A Flutter plugin for Okta OIDC authentication enables secure user login, token management, and identity integration using OpenID Connect with Okta services.

AndroidiOS
30-day downloads
3.2K
Likes
7
Pub points
140

Install package

flutter pub add okta_oidc

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The okta_oidc package is a Flutter plugin that facilitates secure authentication using OpenID Connect with Okta services. It enables seamless user login, token management, and identity integration across Android and iOS platforms. Designed for developers integrating Okta's identity solutions into Flutter apps, it handles OAuth 2.0 flows, token storage, and session management securely. The plugin simplifies the implementation of modern authentication workflows, ensuring compliance with industry standards. It is particularly useful in enterprise applications requiring robust identity verification and access control.

Use cases

  • Enterprise app authentication
  • Single sign-on (SSO) integration
  • Secure user login with Okta
  • Token-based authorization
  • Mobile app identity management

Key features

  • OpenID Connect support
  • Secure token handling
  • Cross-platform (Android & iOS)
  • Okta service integration
  • Session management

Suitable for

  • Enterprise mobile applications
  • Apps requiring SSO
  • Developers using Okta identity services
  • Authentication-heavy apps
  • Flutter apps needing secure login

Considerations

  • Requires Okta account setup
  • Needs proper redirect URI configuration
  • Depends on platform-specific OAuth handling
  • Limited to Okta OIDC providers
  • May require additional backend validation

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

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();

Categories

Dependencies

Dependency list 1 items

  • plugin_platform_interface^2.0.2

Source repository

Projects using this package

No data available yet.