[PR #2414] [MERGED] fix: invalidate all sessions when enabling TOTP #8247

Closed
opened 2026-04-20 18:06:45 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-vikunja/vikunja/pull/2414
Author: @kolaente
Created: 3/18/2026
Status: ✅ Merged
Merged: 3/19/2026
Merged by: @kolaente

Base: main ← Head: fix/invalidate-sessions-on-totp-enable


📝 Commits (1)

  • 178fb5d fix: invalidate all sessions when enabling TOTP

📊 Changes

3 files changed (+11 additions, -2 deletions)

View changed files

📝 frontend/src/i18n/lang/en.json (+2 -1)
📝 frontend/src/views/user/settings/TOTP.vue (+4 -1)
📝 pkg/routes/api/v1/user_totp.go (+5 -0)

📄 Description

When a user enables 2FA, pre-existing sessions were not invalidated, allowing them to continue refreshing tokens without ever being challenged for a TOTP code. This adds session invalidation on TOTP enable (matching the existing behavior on password change) and updates the frontend to inform the user they will be logged out and to properly trigger a logout after enabling.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-vikunja/vikunja/pull/2414 **Author:** [@kolaente](https://github.com/kolaente) **Created:** 3/18/2026 **Status:** ✅ Merged **Merged:** 3/19/2026 **Merged by:** [@kolaente](https://github.com/kolaente) **Base:** `main` ← **Head:** `fix/invalidate-sessions-on-totp-enable` --- ### 📝 Commits (1) - [`178fb5d`](https://github.com/go-vikunja/vikunja/commit/178fb5dc7cb332b7d0872a7f9a2fc7bf7688f76e) fix: invalidate all sessions when enabling TOTP ### 📊 Changes **3 files changed** (+11 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/i18n/lang/en.json` (+2 -1) 📝 `frontend/src/views/user/settings/TOTP.vue` (+4 -1) 📝 `pkg/routes/api/v1/user_totp.go` (+5 -0) </details> ### 📄 Description When a user enables 2FA, pre-existing sessions were not invalidated, allowing them to continue refreshing tokens without ever being challenged for a TOTP code. This adds session invalidation on TOTP enable (matching the existing behavior on password change) and updates the frontend to inform the user they will be logged out and to properly trigger a logout after enabling. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 18:06:45 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#8247