@startinblox/oidc

0.16.5 • Public • Published

SIB OIDC

Allows your users to login via a given OIDC provider.

Installation

Add the following within the <head> of your HTML:

  <script type="module" src="https://cdn.skypack.dev/@startinblox/oidc@beta/dist/index.js"></script>
  <sib-auth>
    <sib-auth-provider
      data-authority="https://api.community.startinblox.com"
      data-id="sib"
      data-client-name="Hubl SIB"
    ></sib-auth-provider>
  </sib-auth>

Documentation

bind-user

To associate the currently logged in user to a component, add the bind-user attribute to it. It will set its `data-src' attribute to the currently logged in user's resource URL.

Example:

<sib-conversation
  bind-user
></sib-conversation>

will result in :

<sib-conversation
  data-src="https://your-domain/your-user-uri"
  bind-user
></sib-conversation>

Methods available

Login

document.querySelector('sib-auth').login();

Logout

document.querySelector('sib-auth').logout();

Get user info

document.querySelector('sib-auth').getUser();

Readme

Keywords

none

Package Sidebar

Install

npm i @startinblox/oidc

Weekly Downloads

2

Version

0.16.5

License

MIT

Unpacked Size

2.35 MB

Total Files

12

Last publish

Collaborators

  • belenio
  • startinbloxbot
  • balessan
  • clem-sib
  • plup
  • matthieu.f
  • jbpasquier