Skip to content

Commit a2abcb4

Browse files
committed
updated inrupt authn lib to latest
1 parent a6d36e4 commit a2abcb4

File tree

4 files changed

+38
-59
lines changed

4 files changed

+38
-59
lines changed

package-lock.json

Lines changed: 32 additions & 48 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
},
2626
"homepage": "https://github.com/solidos/solid-logic#readme",
2727
"devDependencies": {
28+
"@babel/plugin-transform-async-to-generator": "^7.27.1",
2829
"@babel/plugin-transform-class-properties": "^7.27.1",
2930
"@babel/plugin-transform-optional-chaining": "^7.27.1",
30-
"@babel/plugin-transform-async-to-generator": "^7.27.1",
3131
"@babel/plugin-transform-runtime": "^7.28.0",
3232
"@babel/preset-env": "^7.28.0",
3333
"@babel/preset-typescript": "^7.27.1",
@@ -42,7 +42,7 @@
4242
"typescript": "^5.7.3"
4343
},
4444
"dependencies": {
45-
"@inrupt/solid-client-authn-browser": "1.17",
45+
"@inrupt/solid-client-authn-browser": "^3.1.0",
4646
"lint-staged": "^15.4.3",
4747
"rdflib": "^2.2.37",
4848
"solid-namespace": "^0.5.4"

src/authSession/authSession.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
import {
22
Session,
3-
getClientAuthenticationWithDependencies
43
} from '@inrupt/solid-client-authn-browser'
54

6-
export const authSession = new Session(
7-
{
8-
clientAuthentication: getClientAuthenticationWithDependencies({})
9-
},
10-
'mySession'
11-
)
5+
export const authSession = new Session()
126

137

src/authn/SolidAuthnLogic.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { namedNode, NamedNode, sym } from "rdflib";
22
import { appContext, offlineTestID } from "./authUtil";
33
import * as debug from '../util/debug'
4-
import { Session } from "@inrupt/solid-client-authn-browser";
4+
import { EVENTS, Session } from "@inrupt/solid-client-authn-browser";
55
import { AuthenticationContext, AuthnLogic } from "../types";
66

77
export class SolidAuthnLogic implements AuthnLogic {
@@ -40,7 +40,8 @@ export class SolidAuthnLogic implements AuthnLogic {
4040
if (preLoginRedirectHash) {
4141
window.localStorage.setItem('preLoginRedirectHash', preLoginRedirectHash)
4242
}
43-
this.session.onSessionRestore((url) => {
43+
this.session.events.on(EVENTS.SESSION_RESTORED, (url) => {
44+
console.log(`Session restored to ${url}`)
4445
if (document.location.toString() !== url) history.replaceState(null, '', url)
4546
})
4647

0 commit comments

Comments
 (0)