Skip to content

Commit a2a92e2

Browse files
committed
Merge branch 'auth-upgrade' of github.com:solid/solid-ui into auth-upgrade
2 parents 8071d4d + 197e2bd commit a2a92e2

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/authn/authn.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,16 @@ function appContext ():any {
118118
let { SolidAppContext }: any = window
119119
SolidAppContext ||= {}
120120
SolidAppContext.viewingNoAuthPage = false
121-
if (SolidAppContext.app && window.document) {
121+
if (SolidAppContext.noAuth && window.document) {
122122
const currentPage = window.document.location.href
123-
if (currentPage.startsWith(SolidAppContext.app)) {
123+
if (currentPage.startsWith(SolidAppContext.noAuth)) {
124124
SolidAppContext.viewingNoAuthPage = true
125125
const params = new URLSearchParams(window.document.location.search)
126126
if (params) {
127127
let viewedPage = SolidAppContext.viewedPage = params.get('uri') || null
128128
if (viewedPage) {
129129
viewedPage = decodeURI(viewedPage)
130-
if (!viewedPage.startsWith(SolidAppContext.app)) {
130+
if (!viewedPage.startsWith(SolidAppContext.noAuth)) {
131131
const ary = viewedPage.split(/\//)
132132
SolidAppContext.idp = ary[0] + '//' + ary[2]
133133
SolidAppContext.viewingNoAuthPage = false
@@ -147,7 +147,7 @@ function appContext ():any {
147147
export function currentUser (): NamedNode | null {
148148
const app = appContext()
149149
if (app.viewingNoAuthPage) {
150-
return sym(app.webid)
150+
return sym(app.webId)
151151
}
152152
if (authSession.info.webId && authSession.info.isLoggedIn) {
153153
return sym(authSession.info.webId)
@@ -163,7 +163,7 @@ export function currentUser (): NamedNode | null {
163163
*/
164164
export function logIn (context: AuthenticationContext): Promise<AuthenticationContext> {
165165
const app = appContext()
166-
const me = app.viewingNoAuthPage ? sym(app.webid) : defaultTestUser() // me is a NamedNode or null
166+
const me = app.viewingNoAuthPage ? sym(app.webId) : defaultTestUser() // me is a NamedNode or null
167167

168168
if (me) {
169169
context.me = me

0 commit comments

Comments
 (0)