fix: OTP error handling with auto-logout + account copy button#12
Merged
fix: OTP error handling with auto-logout + account copy button#12
Conversation
When OTP retrieval fails due to session expiry or being kicked (e.g. '閒置過久,請嘗試重新登入'), the active session is now automatically removed and the user is redirected to the login page with a 'Session expired' error toast. Previously, the error was silently swallowed with no UI feedback. Also adds launcher.otp_error i18n key for generic OTP failure messages.
Adds a small copy icon (top-right corner, visible on hover) to each account card. Clicking it copies the game account ID to clipboard and shows a brief checkmark confirmation. Replaces the previous double-click-to-copy approach which used error toasts and disrupted the layout.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problems
When a session is expired or kicked (e.g. logged in from another device), clicking "Get OTP" fails silently with no error feedback. The user has no idea the session is dead.
No quick way to copy a game account ID without right-click → context menu.
Changes
OTP retrieval error handling
閒置過久,重新登入,Invalid credentials,Not authenticated,expired), the session is automatically removed and the user is redirected to the login page with a "Session expired" toastlauncher.otp_errori18n key (EN / 繁中 / 简中)Account copy button