Commit 82be47f1 authored by Nicolas Mérigot's avatar Nicolas Mérigot

documentation: add integration example

parent b6e9682b
Pipeline #1980 passed with stage
in 27 seconds
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>SIB-OIDC test</title>
<script type="module" src="sib-oidc.js"></script>
</head>
<body>
<sib-auth
data-authority="https://test-paris.happy-dev.fr/openid/"
data-client_id="833925"
></sib-auth>
<h1>sib-oidc</h1>
<button id="reset">clear storage and set new URL</button>
<button id="reload">reload</button>
<script>
reset.onclick = () => {
window.sessionStorage.clear();
window.localStorage.clear();
history.pushState({}, '', '.?time=' + new Date().toLocaleTimeString());
};
reload.onclick = () => location.reload();
</script>
<script type='module'>
import { SIBBase } from 'https://unpkg.com/@startinblox/core@0.5';
class TestComponent extends SIBBase {
async connectedCallback() {
const user = await this.getUser();
this.innerHTML = JSON.stringify(user);
}
}
customElements.define('sib-test', TestComponent);
</script>
<sib-test></sib-test>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment