mirror of
https://github.com/plankanban/planka.git
synced 2025-08-03 04:25:27 +02:00
feat: Invalidate access token on logout
This commit is contained in:
parent
640908320a
commit
8109936ce2
26 changed files with 242 additions and 37 deletions
|
@ -124,11 +124,13 @@ export function* updateUserPassword(id, data) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (accessTokens && accessTokens[0]) {
|
||||
yield call(setAccessToken, accessTokens[0]);
|
||||
const accessToken = accessTokens && accessTokens[0];
|
||||
|
||||
if (accessToken) {
|
||||
yield call(setAccessToken, accessToken);
|
||||
}
|
||||
|
||||
yield put(actions.updateUserPassword.success(user));
|
||||
yield put(actions.updateUserPassword.success(user, accessToken));
|
||||
}
|
||||
|
||||
export function* updateCurrentUserPassword(data) {
|
||||
|
@ -215,7 +217,7 @@ export function* handleUserDelete(user) {
|
|||
const currentUserId = yield select(selectors.selectCurrentUserId);
|
||||
|
||||
if (user.id === currentUserId) {
|
||||
yield call(logout);
|
||||
yield call(logout, false);
|
||||
}
|
||||
|
||||
yield put(actions.handleUserDelete(user));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue