This App is based on the Auth0 SPA JS Login Quickstart and the Auth0 Calling an API Quickstart. To make thing easier, the lab combines the two and utilizes a proxy provider for state management.
It is part of the Auth Rocks developer workshop presented by Okta
- In your tenant's application settings, be sure eto set
https://*.local-credentialless.webcontainer.io
in the following configurations:Allowed Callback URL
Allowed Web Origin
Allowed Origins (CORS)
- Open the
config.js
file. - If the
domain
andclientId
are not already set, copy the appropriate values from the SPA app created in your tenant.
/*
* config.js
*/
const config = {
auth: {
...defaultAuthConfig,
domain: 'atko-rocks-gentle-animal.demo-platform-staging.auth0app.com',
clientId: 'RBz9va21UvCeuSTYT9nMoRTZah1iTnoH',
},
app: {
port: 3000,
},
};
- If you opted to set your API
audience
value to something other than as instructed, copy theaudience
value from theIdentifier
field found on the API you created in your tenant and paste it into theconfig.js
file.
/*
* config.js
*/
const config = {
auth: {
...defaultAuthConfig,
domain: 'atko-rocks-gentle-animal.demo-platform-staging.auth0app.com',
clientId: 'RBz9va21UvCeuSTYT9nMoRTZah1iTnoH',
/* UNCOMMENT this line ( ⌘ + / or CTRL + / ) to test the private API */
// audience: ['api://authrocks'],
},
app: {
port: 3000,
},
};
- Uncomment line
11
ofconfig.js
to test the private api.
This project is licensed under the MIT license. See the LICENSE file for more info.