Skip to content

Commit

Permalink
refactor: improve demo project
Browse files Browse the repository at this point in the history
  • Loading branch information
gigadie committed May 22, 2018
1 parent e862885 commit 7b69434
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion demo/assets/ng-auth-oidc.min.js

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions demo/private.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,10 @@ <h1>This is a private page</h1>

<div class="auth-mask" style="">Loading...</div>

<script type="text/javascript" src="./assets/ng-auth-oidc.min.js"></script>

<script>
const authGuard = document.querySelector('auth-guard');
authGuard.addEventListener('onVerified', (data) => {
authGuard.addEventListener('onVerified', (event) => {
console.log(event.detail);
const authMask = document.querySelector('.auth-mask');
if (authMask) {
if (authMask.hasOwnProperty('remove')) {
Expand All @@ -54,6 +53,13 @@ <h1>This is a private page</h1>
}
}
});

authGuard.addEventListener('onRefreshed', (event) => {
console.log('Token refreshed');
console.log(event.detail);
});
</script>

<script type="text/javascript" src="./assets/ng-auth-oidc.min.js"></script>
</body>
</html>

0 comments on commit 7b69434

Please sign in to comment.