Skip to content

Reject invalid tokens during flare login --token - #40

Merged
AlexVanderbist merged 1 commit into
mainfrom
validate-token-login
Jul 18, 2026
Merged

Reject invalid tokens during flare login --token#40
AlexVanderbist merged 1 commit into
mainfrom
validate-token-login

Conversation

@AlexVanderbist

Copy link
Copy Markdown
Member

Pasting an invalid token into flare login --token reported a successful login as user "unknown" and stored the broken token.

The /me validation request was sent without an Accept: application/json header, so Laravel redirected the unauthenticated request to the HTML login page and the client followed it to a 200. The token check never failed.

Both /me calls in LoginCommand now send acceptJson(), and a successful validation also requires an email in the response before anything is stored.

@AlexVanderbist
AlexVanderbist merged commit cce8a53 into main Jul 18, 2026
12 checks passed
@AlexVanderbist
AlexVanderbist deleted the validate-token-login branch July 18, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant