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.
To install the library, use npm or yarn:
npm install react-native-keycloak-login-helper
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);
If you have questions, concerns, or need assistance, here are the primary contacts for this project:
-
Repo owner or admin:
-
Developers& Project Maintainers:
We appreciate your feedback and contributions to make this project better!
Thank you for your interest and support!