Skip to content

kisssdev/aurelia-kis-oidc-sample

Repository files navigation

aurelia-kis-oidc plugin demo

  • This is an aurelia application with OpenID Connect authentication (implicit flow) that calls an OAuth2 (bearer token) protected web api.
  • The OpenID Connect and OAuth2 authentication is provided by the aurelia-kis-oidc plugin.
  • The Identity Provider is Microsoft Azure Active Directory B2C. It has been configured to use either Google or Microsoft as social login providers. You will have to sign in with your Microsoft or your Google account.
  • For the purpose of the demo, the access token validity is set to 5 mn (rather than 1 hour by default) and the session duration is set to 15 mn (rather than 1 day).
  • When the access token is expired but the session is still valid, the plugin will transparently try a silent login.
  • When the access token and the session are expired, the plugin will prompt the user to sign-in again.

Run the application

  1. Clone this repo.

  2. Install the dependencies.

    npm install
  3. Configure the OpenID Connect parameters.

    OpenID configuration parameters are stored in the configureOpenidPlugin function of the main.ts. You need to configure at least:

    • the authority url of your identity provider,
    • the client_id of your application,
    • the scope in case your are calling a protected web api.
  4. Run the application.

    npx au run

See it in action

If you want to check the behavior of the application, you can see it in action here.

About

A full example of the aurelia-kis-oidc plugin.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published