Skip to content

Latest commit

 

History

History
63 lines (46 loc) · 2.03 KB

README.md

File metadata and controls

63 lines (46 loc) · 2.03 KB

openidconnect-signin

is a custom HTML5 element that makes it really easy to login to an OpenID Connect provider. It displays a button that is optimized for single-page applications. It works with a popup instead of redirects, so the context of your Web application in the user's browser remains the same.

The element is based on lit-element.

⚠️ This is a custom branch where you need to manually import a third-party dependency (see step 2 in the following) to ensure compatibility with ES6 modules.⚠️

Example

  1. Install the dependency
npm install rwth-acis/openidconnect-signin
  1. Include the third-party dependency oidc-client in your main index (or any HTML) file
<script src="../node_modules/oidc-client/lib/oidc-client.js"></script>
  1. Import our openidconnect-signin element into your source code
import 'openidconnect-signin/openidconnect-signin.js'
  1. Register an OIDC-token using the Learning Layers Self-service
  2. Add the HTML-element with your newly created client-id
<openidconnect-signin clientid="..." scopes="openid profile"></openidconnect-signin>

Visit the Github pages for further documentation.

Demo

Either try it out yourself or enjoy this gif that was made with ❤️:

openidconnect-signin in action

Development

Clone this project and install the dependencies.

git clone git@github.com:rwth-acis/openidconnect-signin.git
cd openidconnect-signin
npm install

Refresh Docs

Every time the API or a doc comment changes it is advisable to rebuild the documentation. Run the docs npm script and do not forget to add all docs files to git in case any new files have been created.

npm run docs
git add docs
git commit -am "Update docs"

License

MIT