Try the ReactJS Todo Login Widget sample
PingOne Advanced Identity Cloud PingAM Login Widget
In this tutorial you configure and run the ReactJS Todo Login Widget sample application.
The sample demonstrates how to use the Advanced Identity Cloud/PingAM Login Widget in a ReactJS web application. It includes Login and Registration journeys, a protected Todo application, and a Node.js REST API server. The sample uses Webpack and the npm workspaces in the SDK Sample Apps repository.
|
This tutorial is for ReactJS web applications that run in a browser. It does not cover React Native, which is a separate framework for building native mobile applications. |
Download or view the source code in the ReactJS Todo Login Widget sample repository.
What the sample demonstrates
-
Configuring the Advanced Identity Cloud/PingAM Login Widget before the React application renders.
-
Mounting the modal form factor in a static HTML element.
-
Starting a named Login or Registration journey from React.
-
Updating React state from Advanced Identity Cloud/PingAM Login Widget observable events.
-
Calling a protected Todo API with an access token.
-
Revoking tokens and ending the user session when the user signs out.
For a from-scratch Vite integration that explains the widget APIs without using this sample, see Integrate the Login Widget into a React app.