File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -126,18 +126,15 @@ function registerOauth() {
126126 } )
127127 }
128128
129- let handled
130129 if ( req . hostname !== redirectURL . hostname ) {
131- handled = await handleServiceUrl ( req , res )
130+ return handleServiceUrl ( req , res )
132131 }
133132
134133 if ( ! req . isAuthenticated ( ) ) {
135134 return res . redirect ( "/auth" )
136135 }
137136
138- if ( ! handled ) {
139- next ( )
140- }
137+ next ( )
141138 } )
142139
143140 router . get ( "/auth" , passport . authenticate ( "oauth2" ) )
@@ -164,13 +161,11 @@ function registerFakeAuth() {
164161 sameSite : "lax" ,
165162 maxAge : 1000 * 60 * 60 ,
166163 } )
164+ } else {
165+ return await handleServiceUrl ( req , res )
167166 }
168167
169- const handled = await handleServiceUrl ( req , res )
170-
171- if ( ! handled ) {
172- next ( )
173- }
168+ next ( )
174169 } )
175170
176171 router . get ( "/auth" , ( req , res ) => {
You can’t perform that action at this time.
0 commit comments