File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -90,14 +90,12 @@ function middleware (oidc) {
9090
9191 // Static assets related to authentication
9292 const authAssets = [
93+ [ '/.well-known/solid/login/' , '../static/popup-redirect.html' , false ] ,
9394 [ '/common/' , 'solid-auth-client/dist-popup/popup.html' ] ,
9495 [ '/common/js/' , 'solid-auth-client/dist-lib/solid-auth-client.bundle.js' ] ,
9596 [ '/common/js/' , 'solid-auth-client/dist-lib/solid-auth-client.bundle.js.map' ]
9697 ]
97- authAssets . map ( ( [ path , file ] ) => routeResolvedFile ( router , path , file ) )
98- // Redirect for .well-known login popup location
99- router . get ( '/.well-known/solid/login' ,
100- ( req , res ) => res . redirect ( '/common/popup.html' ) )
98+ authAssets . map ( args => routeResolvedFile ( router , ...args ) )
10199
102100 // Initialize the OIDC Identity Provider routes/api
103101 // router.get('/.well-known/openid-configuration', discover.bind(provider))
Original file line number Diff line number Diff line change @@ -234,8 +234,8 @@ function reqToPath (req) {
234234/**
235235 * Adds a route that serves a static file from another Node module
236236 */
237- function routeResolvedFile ( router , path , file ) {
238- const fullPath = path + file . match ( / [ ^ / ] + $ / )
237+ function routeResolvedFile ( router , path , file , appendFileName = true ) {
238+ const fullPath = appendFileName ? path + file . match ( / [ ^ / ] + $ / ) : path
239239 const fullFile = require . resolve ( file )
240240 router . get ( fullPath , ( req , res ) => res . sendFile ( fullFile ) )
241241}
Original file line number Diff line number Diff line change 1+ < script > location . replace ( `/common/popup.html${ location . hash } ` ) </ script >
You can’t perform that action at this time.
0 commit comments