Clear login token once apppassword is generated

Fixes #7697

When using the new login flow a token will be generated since we login.
However after that we generate yet another token to return (as we
should).

However we should kill the current session token as we are done with it.
And will never use it again.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2018-01-04 14:30:40 +01:00
parent e655732458
commit 82f03e1314
No known key found for this signature in database
GPG key ID: F941078878347C0C

View file

@ -319,6 +319,9 @@ class ClientFlowLoginController extends Controller {
$redirectUri = 'nc://login/server:' . $serverPath . '&user:' . urlencode($loginName) . '&password:' . urlencode($token);
}
// Clear the token from the login here
$this->tokenProvider->invalidateToken($sessionId);
return new Http\RedirectResponse($redirectUri);
}
}