Skip to content

Commit 0965b95

Browse files
committed
updated inrupt authn lib to latest so we needed some changes
1 parent 8f006f2 commit 0965b95

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/footer/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export async function initFooter (store: LiveStore, options?: FooterOptions) {
3131
const pod = getPod()
3232
const podOwner = await getPodOwner(pod, store)
3333
rebuildFooter(footer, store, pod, podOwner, options)()
34-
authSession.onLogin(rebuildFooter(footer, store, pod, podOwner, options))
35-
authSession.onLogout(rebuildFooter(footer, store, pod, podOwner, options))
34+
authSession.events.on("login", rebuildFooter(footer, store, pod, podOwner, options))
35+
authSession.events.on("logout", rebuildFooter(footer, store, pod, podOwner, options))
3636
}
3737
/**
3838
* @ignore exporting this only for the unit test

src/header/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ export async function initHeader (store: IndexedFormula, userMenuList: MenuItems
5757

5858
const pod = getPod()
5959
rebuildHeader(header, store, pod, userMenuList, options)()
60-
authSession.onLogout(rebuildHeader(header, store, pod, userMenuList, options))
61-
authSession.onLogin(rebuildHeader(header, store, pod, userMenuList, options))
60+
authSession.events.on("logout", rebuildHeader(header, store, pod, userMenuList, options))
61+
authSession.events.on("login", rebuildHeader(header, store, pod, userMenuList, options))
6262
}
6363
/**
6464
* @ignore exporting this only for the unit test

src/login/login.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ function signInOrSignUpBox (
387387
signInPopUpButton.setAttribute('value', 'Log in')
388388
signInPopUpButton.setAttribute('style', `${signInButtonStyle}${style.headerBannerLoginInput}` + style.signUpBackground)
389389

390-
authSession.onLogin(() => {
390+
authSession.events.on("login", () => {
391391
const me = authn.currentUser()
392392
// const sessionInfo = authSession.info
393393
// if (sessionInfo && sessionInfo.isLoggedIn) {
@@ -693,14 +693,14 @@ export function loginStatusBox (
693693
}
694694
trackSession()
695695

696-
authSession.onLogin(trackSession)
697-
authSession.onLogout(trackSession)
696+
authSession.events.on("login", trackSession)
697+
authSession.events.on("logout", trackSession)
698698
box.me = '99999' // Force refresh
699699
box.refresh()
700700
return box
701701
}
702702

703-
authSession.onLogout(async () => {
703+
authSession.events.on("logout", async () => {
704704
const issuer = window.localStorage.getItem('loginIssuer')
705705
if (issuer) {
706706
try {

0 commit comments

Comments
 (0)