This example shows how to build a search app with Angular, Angular CLI, and Angular Material.
Please read Build Your First PWA with Angular to see how this app was created.
Prerequisites: Node.js.
Okta has Authentication and User Management APIs that reduce development time with instant-on, scalable user infrastructure. Okta's intuitive API and expert support make it easy for developers to authenticate, manage and secure users and roles in any application.
To install this example application, run the following commands:
git clone https://github.com/oktadeveloper/okta-angular-pwa-example.git
cd okta-angular-pwa-example
This will get a copy of the project installed locally. To install all of its dependencies and start each app, follow the instructions below.
Run the app using:
npm install
npm start
Before you begin, you’ll need a free Okta developer account. Install the Okta CLI and run okta register
to sign up for a new account. If you already have an account, run okta login
. Then, run okta apps create
. Select the default app name, or change it as you see fit. Choose Single-Page App and press Enter.
Use http://localhost:4200/callback
for the Redirect URI and set the Logout Redirect URI to http://localhost:4200
.
Copy your issuer
and copy the clientId
in to src/app/app.module.ts
.
const oktaConfig = {
issuer: 'https://{yourOktaDomain}/oauth2/default',
clientId: '{clientId}',
redirectUri: window.location.origin + '/callback'
};
This example uses the following open source libraries from Okta:
Please post any questions as comments on the blog post, or visit our Okta Developer Forums.
Apache 2.0, see LICENSE.