Repository navigation
fix(auth): stop calling a missing wallet an invalid token - #604
Merged
dadiorchen merged 1 commit intoSep 29, 2026
Merged
Conversation
An account can be signed in and have no wallet. The token verifies, the wallet lookup finds nothing, and every endpoint except POST /wallets answered 401 "invalid token received", telling a valid user their login was broken. It now answers 409 with reason no_wallet, so a client can tell "make a wallet first" from "sign in again". 401 stays for a token that is genuinely bad or expired. This re-applies Greenstand#580, which the rollback in Greenstand#593 reverted. The app side that reads the reason is already merged. Closes Greenstand/treetracker-wallet-app#891
dadiorchen
approved these changes
Sep 29, 2026
|
🎉 This PR is included in version 1.44.0-keycloak.39 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Collaborator
|
@mahdi2ba please test it |
Collaborator
|
@dadiorchen Retested on dev Test OK , Fixed. |
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.
Closes Greenstand/treetracker-wallet-app#891
Problem
An account can be signed in and have no wallet. The token verifies, the wallet
lookup finds nothing, and every endpoint except
POST /walletsanswered401 "invalid token received", telling a valid user their login was broken.
Change
It answers 409 with
reason: no_wallet, so a client can tell "make a walletfirst" from "sign in again". 401 stays for a token that is genuinely bad or
expired.
This re-applies #580, which the rollback in #593 reverted. The app side that
reads the reason is already merged.
Verification
no-wallet-account.spec.jscoversGET /walletsand redeeming a share linkwith a verified token and no wallet, both 409 with the reason.