Story/m 2605/report user logouts#2
Conversation
There was a problem hiding this comment.
Pull request overview
This PR enhances the error reporting for user authentication failures by introducing a standardized LoginFailurePayload type and implementing comprehensive logout tracking. The changes ensure consistent error information is provided when login attempts fail or users are automatically logged out due to authentication issues.
Changes:
- Introduced
LoginFailurePayloadtype andnormalizeLoginFailurefunction to standardize error reporting - Updated
KeyStorageinterface to enforce async operations with Promise return types - Modified authentication flow to properly await async operations and report logout-triggered failures
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/user/User.ts | Added login failure normalization, made authentication methods async, and updated error reporting with logout tracking |
| src/user/Accounts.ts | Updated onLoginFailure callback signature to use typed LoginFailurePayload |
| src/index.ts | Exported LoginFailurePayload type for external use |
| src/Data.ts | Changed KeyStorage interface to require Promise return types for all methods |
| package.json | Version bump to 2.28.0 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5f454004a4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
No description provided.