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.
- Install the dependency
npm install rwth-acis/openidconnect-signin
- 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>
- Import our
openidconnect-signin
element into your source code
import 'openidconnect-signin/openidconnect-signin.js'
- Register an OIDC-token using the Learning Layers Self-service
- 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.
Either try it out yourself or enjoy this gif that was made with ❤️:
Clone this project and install the dependencies.
git clone git@github.com:rwth-acis/openidconnect-signin.git
cd openidconnect-signin
npm install
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"
MIT