Skip to content

Commit 458d543

Browse files
authored
Merge pull request #16 from Staffbase/NFS-616-session-deletion-fix
NFS-616: adds pid fallback
2 parents 09def76 + 88755df commit 458d543

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/PluginSession.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,15 @@ public function __construct($pluginId, $appSecret, SessionHandlerInterface $sess
9090
}
9191

9292
$this->pluginInstanceId = $pid;
93-
$this->sessionId = $sid;
93+
$this->sessionId = $sid ?: $pid;
9494

9595
// we update the SSO info every time we get a token
9696
if ($jwt) {
9797
// decrypt the token
9898
$this->sso = new SSOToken($appSecret, $jwt, $leeway);
9999

100100
$this->pluginInstanceId = $this->sso->getInstanceId();
101-
$this->sessionId = $this->sso->getSessionId();
101+
$this->sessionId = $this->sso->getSessionId() ?: $this->sso->getInstanceId();
102102
}
103103

104104
// dispatch remote calls from Staffbase

0 commit comments

Comments
 (0)