arpithparikh / udplabs-cic-app-template-hjvwea

Created with StackBlitz ⚡️

Home Page:https://stackblitz.com/edit/udplabs-cic-app-template-hjvwea

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

auth.rocks 101 Starter App

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

Configuring the App

Challenge 1

  1. 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)
  2. Open the config.js file.
  3. If the domain and clientId 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,
	},
};

Challenge 2

  1. If you opted to set your API audience value to something other than as instructed, copy the audience value from the Identifier field found on the API you created in your tenant and paste it into the config.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,
	},
};
  1. Uncomment line 11 of config.js to test the private api.



LICENSE

This project is licensed under the MIT license. See the LICENSE file for more info.


About

Created with StackBlitz ⚡️

https://stackblitz.com/edit/udplabs-cic-app-template-hjvwea

License:MIT License


Languages

Language:JavaScript 63.3%Language:HTML 20.4%Language:CSS 16.3%