Sitelet https://web.archive.org/web/20200910013349/https://github.com/httpsOmkar/auth-react-component
Skip to content
master
Go to file
Code
This branch is 37 commits ahead, 25 commits behind mozilla-frontend-infra:master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Logo

Keycloak with ReactJS

Auth components


NPM version Build Status Known Vulnerabilities

Requirements

  • React, React DOM, keycloak-js

Getting started

Integrate the keycloak with the react

# If using Yarn:
yarn add keycloak-js-react

# If using npm:
npm install --save keycloak-js-react

Import

import KeycloakWrapper from 'keycloak-js-react/components/KeycloakWrapper';

// using require
const KeycloakWrapper = require('keycloak-js-react/components/KeycloakWrapper').default;

Usage

<KeycloakWrapper keycloak={ keycloakInstance } keycloakOptions={{ onLoad: 'check-sso', checkLoginIframeInterval: 1 }} tokenUpdateInterval={300000}>
  <App/>
</KeycloakWrapper>

Development and Contributing

To get started:

  • Fork and clone this repo.
  • Install the dependencies with yarn.
  • Start the development server with yarn start. This will launch a styleguide instance. Open a browser to http://localhost:6060 to preview the React components.
  • Use CTRL-C to exit the styleguide.
  • Use yarn build to generate the compiled component for publishing to npm.

Committing and Pushing changes

This project uses semantic-release to do automatic releases and generate a changelog based on the commit history. Please follow the ESLint convention for commit messages so that we could properly determine the next semantic version number to publish and generate a changelog.

Feel free to open an issue, submit a pull request, or contribute however you would like. Understand that this documentation is still a work in progress, so file an issue or submit a PR to ask questions or make improvements. Thanks!

You can’t perform that action at this time.