Download the sample Angular application
To view a simple example of an Angular app, clone the Okta Angular Identity Engine sample app and follow the setup procedure:
Clone the Angular sample repository
Clone the Okta Angular sample app repository and navigate to the top-level folder.
Install the dependencies
Install the dependencies in the okta-angular-oie-sample-quickstart
folder:
Update the application configuration file
Update the configuration file of the sample app (src/app/okta-config.ts
) in the project root folder. The okta-config.ts
file contains the configuration values for your app integration. See Create an Okta app integration for details on these values.
Run the sample application
Navigate to the project folder and run the sample application.
Open a new browser and navigate to the default local host port (http://localhost:4200
). Click Login and sign in with a user from your org. After a successful authentication, the user's ID token appears on the page.
Create an Angular app (optional)
To create an Angular app, open a terminal and install the Angular CLI:
Now, create an app using the Angular CLI:
When asked Would you like to add Angular routing?
, press y.
After all prompts are answered, the Angular CLI creates a project in a folder named okta-app
and installs all required dependencies.
Install the Okta Auth SDK (opens new window) using npm
: