Sample app shell for using the Piral auth plugins.
⚡ This sample demonstrates the primary use of piral-oidc
and piral-oauth2
in a simple app shell.
Feel free to play around with the code using StackBlitz.
You can visit this demo at auth.samples.piral.cloud/.
Install the dependencies:
npm install
And then change the values of the createPlugin
function in src/index.tsx. These values need to come from your OpenID Connect (OIDC) or OAuth2 provider.
Now run:
npm start
The app shell should be up and running.
You find more information at the oauth2 plugin page or the oidc plugin page.
Most issues will actually be solved by getting familiar with the libraries underneath.
- For
piral-oauth2
the work is done by client-oauth2. - For
piral-oidc
the work is done by oidc-client.
Piral and this sample code is released using the MIT license. For more information see the license file.