File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -139,7 +139,10 @@ public function handleLoginRequest(
139139 'providerId ' => $ this ->session ->get (\OCA \UserOIDC \Controller \LoginController::PROVIDERID )
140140 ];
141141 // TODO: switch 'oidc.redirect' to \OCA\UserOIDC\Controller\LoginController::REDIRECT_AFTER_LOGIN once switched to public
142- $ options ['target ' ] = $ this ->forceRelativeUrl ($ this ->session ->get ('oidc.redirect ' ) ?? '/ ' );
142+ $ state = $ this ->request ->getParam ('state ' ) ?? '' ;
143+ $ sessionKeySuffix = ($ state !== '' ) ? '- ' . $ state : '' ;
144+ $ redirect = $ this ->session ->get ('oidc.redirect ' ) ?? $ this ->session ->get ('oidc.redirect ' . $ sessionKeySuffix ) ?? '/ ' ;
145+ $ options ['target ' ] = $ this ->forceRelativeUrl ($ redirect );
143146
144147 // Fix: restore the slave flow path into options.target after all backend blocks.
145148 //
You can’t perform that action at this time.
0 commit comments