File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -988,6 +988,7 @@ export function renderSignInPopup (dom: HTMLDocument) {
988988 if ( preLoginRedirectHash ) {
989989 window . localStorage . setItem ( 'preLoginRedirectHash' , preLoginRedirectHash )
990990 }
991+ window . localStorage . setItem ( 'loginIssuer' , issuerUri )
991992 // Login
992993 await authSession . login ( {
993994 redirectUrl : window . location . href ,
@@ -1243,7 +1244,23 @@ export function loginStatusBox (
12431244 return box
12441245}
12451246
1246- authSession . onLogout ( ( ) => {
1247+ authSession . onLogout ( async ( ) => {
1248+ const issuer = window . localStorage . getItem ( 'loginIssuer' )
1249+ if ( issuer ) {
1250+ try {
1251+ const wellKnownUri = new URL ( issuer )
1252+ wellKnownUri . pathname = '/.well-known/openid-configuration'
1253+ const wellKnownResult = await fetch ( wellKnownUri . toString ( ) )
1254+ if ( wellKnownResult . status === 200 ) {
1255+ const openidConfiguration = await wellKnownResult . json ( )
1256+ if ( openidConfiguration && openidConfiguration . end_session_endpoint ) {
1257+ await fetch ( openidConfiguration . end_session_endpoint )
1258+ }
1259+ }
1260+ } catch ( err ) {
1261+ // Do nothing
1262+ }
1263+ }
12471264 window . location . reload ( )
12481265} )
12491266
Original file line number Diff line number Diff line change 33 This file was copied from mashlib/src/global/header.ts file. It is modified to
44 work in solid-ui by adjusting where imported functions are found.
55 */
6- import { IndexedFormula , NamedNode , sym } from 'rdflib'
6+ import { IndexedFormula , NamedNode } from 'rdflib'
77import { loginStatusBox , authSession , currentUser } from '../authn/authn'
88import * as widgets from '../widgets'
99import { emptyProfile } from './empty-profile'
You can’t perform that action at this time.
0 commit comments