Skip to content

vijetmahabaleshwar-okta/samples-js-angular

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Angular Sample Applications for Okta

This repository contains several sample applications that demonstrate various Okta use-cases in your Angular application.

Each sample makes use of the Okta Angular Library.

Please find the sample that fits your use-case from the table below.

Sample Description
Okta-Hosted Login An Angular application that will redirect the user to the Okta-Hosted login page for authentication. The user is redirected back to the Angular application after authenticating.
Custom Login Page An Angular application that uses the Okta Sign-In Widget within the Angular application to authenticate the user.

Running E2E Tests locally

E2E Tests will be run against the Custom Login and Okta-Hosted Login servers.

Run npm install in the root of the project (to install the dev dependencies for testing). This will also install the dependencies for the Custom Login and Okta-Hosted Login servers.

npm install

Then you need to setup the following environment variables.

export CLIENT_ID={yourAppClientId}
export OKTA_DOMAIN={yourOktaOrgDomain}

NOTE: Use only the domain part of your org url while setting OKTA_DOMAIN environment.

After setting up the environment variables, you need to run a script to update the configuration and also clone the java spring resource server repo, which will be used to test the /messages page in the sample application.

sh scripts/setup-env.sh

A final step is to update the following environment variables with username and password of the user you want to use in your tests.

Note that the USERNAME should be of the form "[email protected]".

export USERNAME={userName}
export PASSWORD={password}

Then run the E2E tests:

npm test

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 64.9%
  • HTML 20.6%
  • JavaScript 13.0%
  • Shell 1.2%
  • CSS 0.3%