Skip to content

Commit 8a12878

Browse files
authored
Merge pull request #1053 from nextcloud/enh/noid/small-gss-adjustments
Small adjustments for GSS
2 parents 314b32d + 2debe7a commit 8a12878

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/Controller/LoginController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class LoginController extends BaseOidcController {
5858
private const STATE = 'oidc.state';
5959
private const NONCE = 'oidc.nonce';
6060
public const PROVIDERID = 'oidc.providerid';
61-
private const REDIRECT_AFTER_LOGIN = 'oidc.redirect';
61+
public const REDIRECT_AFTER_LOGIN = 'oidc.redirect';
6262
private const ID_TOKEN = 'oidc.id_token';
6363
private const CODE_VERIFIER = 'oidc.code_verifier';
6464

@@ -521,6 +521,8 @@ public function code(string $state = '', string $code = '', string $scope = '',
521521
$this->userSession->createSessionToken($this->request, $user->getUID(), $user->getUID());
522522
$this->userSession->createRememberMeToken($user);
523523
// TODO server should/could be refactored so we don't need to manually create the user session and dispatch the login-related events
524+
// Warning! If GSS is used, it reacts to the BeforeUserLoggedInEvent and handles the redirection itself
525+
// So nothing after dispatching this event will be executed
524526
$this->eventDispatcher->dispatchTyped(new BeforeUserLoggedInEvent($user->getUID(), null, \OC::$server->get(Backend::class)));
525527
$this->eventDispatcher->dispatchTyped(new UserLoggedInEvent($user, $user->getUID(), null, false));
526528
}

0 commit comments

Comments
 (0)