anilpai / react-okta-hooks

basic implementation to use Okta Auth SDK with react-hooks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Okta Hooks

A basic implementation to use Okta Auth SDK with react-hooks.

Why?

There has been a lot of hype around React Hooks, but this hype merely reflects that there are obvious real world benefits of Hooks to React developers everywhere.

This library explores how React Hooks can work to make integration with Okta even more straightforward than it already is. The implementation with hooks is 10x simpler than our previous implementation.

I took the initial react-hooks implementaion of Shou Wu's (@shuowu) repo available at https://github.com/shuowu-okta/okta-react-hooks-exp & added more features. Wu tried to abstract hooks logic into separated modules for general usage.

Setup

Go to /src/config.js and fill the Okta credentials (domain url & clientId)

Installation

yarn install

In the project directory, you can run the project:

yarn dev

About

basic implementation to use Okta Auth SDK with react-hooks


Languages

Language:JavaScript 86.0%Language:HTML 14.0%