Sample app demonstrating how to use the library redux-oidc using the grant type Authorization Code with PKCE
with react-router.
-
Clone this repository. You will need node and npm installed globally on your machine.
$ git clone https://github.com/henriquels25/redux-oidc-sample
-
Install the dependencies
$ cd redux-oidc-sample
$ npm install
This project contains two execution scripts:
-
Local: Sets up a mock authorization server, changes the environment to point to it and starts the project.
$ npm run local
-
Okta: Changes the environment to point to the Okta authorization server and starts the project.
$ npm run okta
You can access a live version of this application integrated with the Okta authorization server in this link.
A free authorization server was setup in Okta, configured to only accept the authorization code flow and requests from the following clients:
You can use the following credentials to login in the application:
Username: [email protected]
Password: EC5tX7<x/n'[#'UH
The access token expiration time is set to 5 minutes and the silent refresh in enabled in this application.
This project uses oauth2-mock-server as a mock authorization server in order to have a working local profile.
If you have an idea how to improve this sample project, please open an issue or submit a PR.