react-native-keycloak-login-helper

1.0.0 • Public • Published

React Native Keycloak Integration Library

The React Native Keycloak Integration Library simplifies Keycloak authentication and authorization for seamless application integration. It provides a set of functions and configurations to streamline the process of implementing Keycloak within your React Native application.

Installation

To install the library, use npm or yarn:

npm install react-native-keycloak-login-helper

Usage/Examples

Import the required functions and configurations from the library in your React Native application.

import {
  setConfig,
  getConfig,
  API_ENDPOINTS,
  getLoginURL,
  setConstants,
  getConstants,
} from 'react-native-keycloak-integration';

Then, initialize the configuration and constants, and use the provided functions to interact with Keycloak.

// Set Keycloak configuration
setConfig({
  keycloak_url: 'https://keycloak-config-url.com/',
  realm: 'REALM-NAME',
  clientId: 'mobile-enterprise',
  redirectUri: 'app://HomePage',
  appsiteUri: 'https://keycloak-config-url.com/',
});

// Set constants for Keycloak
setConstants({
  GET_LOGIN_URL: '/protocol/openid-connect/auth?',
  REALMS: 'realms/',
  CODE: 'code',
  OPENID: 'openid',
});

// Start login process
startLoginProcess();

// Retrieve tokens
retrieveTokens(code);

Who do I talk to?

If you have questions, concerns, or need assistance, here are the primary contacts for this project:

We appreciate your feedback and contributions to make this project better!

Thank you for your interest and support!

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i react-native-keycloak-login-helper

      Weekly Downloads

      2

      Version

      1.0.0

      License

      ISC

      Unpacked Size

      6.74 kB

      Total Files

      7

      Last publish

      Collaborators

      • alianshad