Ping provides these samples to help demonstrate SDK functionality/implementation. They are provided "as is" and are not official products of Ping and are not officially supported.
The Ping SDK for JavaScript enables you to integrate your SPA with our services.
There are two UI deployment options:
- Embedded:
- With this option, each app has to have its own login User Interface (UI).
- Users authenticate natively to your application.
- OIDC (Redirect) Login:
- Often referred to as centralized login, with this option you reuse a central UI (such as hosted pages for PingOne Advanced Identity Cloud or the Login Widget for PingOne/PingOne DaVinci) your own web application for login requests in multiple apps and sites.
- User's are redirected via a browser to a central place for authentication.
We provide samples that demonstrate both methods.
To try out the Ping JavaScript SDK please look at one of our samples:
-
Embedded login -
embedded-login- A barebones example of how to use the
@forgerock/javascript-sdkin a vanilla html & javascript app with embedded login. The sample supports the OOTB Login Journey with Username and Password.
- A barebones example of how to use the
-
- Todo application that involves authentication and authorization of a user to post Todos with the
@forgerock/javascript-sdkin ReactJS. The main branch includes many flavors of callbacks, including WebAuthN, embedded login, and social login.
- Todo application that involves authentication and authorization of a user to post Todos with the
-
- Todo application that involves authentication and authorization of a user to post Todos with the
@forgerock/javascript-sdkin Angular. The main branch includes many flavors of callbacks, including WebAuthN, embedded login, and social login.
- Todo application that involves authentication and authorization of a user to post Todos with the
-
React Todo DaVinci -
reactjs-todo-davinci- Todo application that involves authentication and authorization of a user to post Todos with DaVinci in ReactJS. Demonstrates handling DaVinci flows and collectors.
-
Central login -
central-login-oidc- A barebones example of how to use the
@forgerock/javascript-sdkin a vanilla html & javascript app with centralized login with AIC/AM or PingOne services(OIDC Login). Configure the server type on the.envfile.
- A barebones example of how to use the
Detailed documentation is provided, and includes topics such as:
- Tutorial walkthroughs for each server
- Integrating functionality such as PingOne Protect, WebAuthn, and more
- Code snippets
- API Reference documentation
JavaScript
- Please use a modern web browser like Chrome, Safari, or Firefox
- Node >= 18