fix(auth): header loginMethod
The header loginMethod was never actually used, these changes aim to fix that.
Fixes #4488
edit: I have deployed this image and have been successfully logged in via header auth if i have ACTUAL_LOGIN_METHOD=header; and also checked that not setting this variable correctly defaults to the password method.
Deploy Preview for actualbudget ready!
| Name | Link |
|---|---|
| Latest commit | 8588ed8645c50bb1efa2b5a6beb87c988758c653 |
| Latest deploy log | https://app.netlify.com/projects/actualbudget/deploys/683240ba37f3a700083eaef4 |
| Deploy Preview | https://deploy-preview-5054.demo.actualbudget.org |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify project configuration.
Bundle Stats — desktop-client
Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.
As this PR is updated, I'll keep you updated on how the bundle size is impacted.
Total
| Files count | Total bundle size | % Changed |
|---|---|---|
| 19 | 9.73 MB → 9.73 MB (+266 B) | +0.00% |
Changeset
| File | Δ | Size |
|---|---|---|
src/components/manager/subscribe/common.tsx |
📈 +174 B (+7.86%) | 2.16 kB → 2.33 kB |
src/components/ServerContext.tsx |
📈 +92 B (+2.30%) | 3.91 kB → 4 kB |
View detailed bundle breakdown
Added
No assets were added
Removed
No assets were removed
Bigger
| Asset | File Size | % Changed |
|---|---|---|
| static/js/index.js | 6.53 MB → 6.53 MB (+266 B) | +0.00% |
Smaller
No assets were smaller
Unchanged
| Asset | File Size | % Changed |
|---|---|---|
| static/js/de.js | 120.4 kB | 0% |
| static/js/en-GB.js | 5.93 kB | 0% |
| static/js/en.js | 116.42 kB | 0% |
| static/js/es.js | 68.78 kB | 0% |
| static/js/fr.js | 123.95 kB | 0% |
| static/js/nl.js | 100.75 kB | 0% |
| static/js/pt-BR.js | 122.19 kB | 0% |
| static/js/sv.js | 65.53 kB | 0% |
| static/js/uk.js | 121.39 kB | 0% |
| static/js/indexeddb-main-thread-worker-e59fee74.js | 12.94 kB | 0% |
| static/js/workbox-window.prod.es5.js | 5.64 kB | 0% |
| static/js/resize-observer.js | 18.37 kB | 0% |
| static/js/BackgroundImage.js | 122.29 kB | 0% |
| static/js/ReportRouter.js | 1.71 MB | 0% |
| static/js/narrow.js | 391.1 kB | 0% |
| static/js/wide.js | 113.98 kB | 0% |
| static/js/TransactionList.js | 10.92 kB | 0% |
| static/js/useAccountPreviewTransactions.js | 3.14 kB | 0% |
Bundle Stats — loot-core
Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.
As this PR is updated, I'll keep you updated on how the bundle size is impacted.
Total
| Files count | Total bundle size | % Changed |
|---|---|---|
| 1 | 2.26 MB → 2.26 MB (+45 B) | +0.00% |
Changeset
| File | Δ | Size |
|---|---|---|
packages/loot-core/src/server/auth/app.ts |
📈 +57 B (+0.67%) | 8.35 kB → 8.41 kB |
View detailed bundle breakdown
Added
No assets were added
Removed
No assets were removed
Bigger
| Asset | File Size | % Changed |
|---|---|---|
| kcab.worker.js | 2.26 MB → 2.26 MB (+45 B) | +0.00% |
Smaller
No assets were smaller
Unchanged
No assets were unchanged
Walkthrough
The changes introduce a clear separation between the currently selected login method and the list of available login methods within the desktop client context. The ServerContextValue type is updated to include a loginMethod property and separate setters for the current and available login methods. Hooks and provider logic are refactored to use these new properties and setters. The server-side code is updated to handle 'header' as a valid login method, ensure the loginMethod is consistently included in responses, and generalize the type of loginMethod in configuration. The /needs-bootstrap endpoint logic is simplified to always return the result of getLoginMethod().
Assessment against linked issues
| Objective | Addressed | Explanation |
|---|---|---|
| Ensure that when header authentication is configured, the app does not prompt for a password (#4488) | ✅ | |
Support 'header' as a valid login method throughout the authentication flow (#4488) |
✅ | |
| Consistently propagate and use the configured login method from server to client (#4488) | ✅ |
Suggested labels
:sparkles: Merged
[!NOTE]
⚡️ AI Code Reviews for VS Code, Cursor, Windsurf
CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Learn more here.
✨ Finishing Touches
- [ ] 📝 Generate Docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
🪧 Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
-
I pushed a fix in commit <commit_id>, please review it. -
Explain this complex logic. -
Open a follow-up GitHub issue for this discussion.
-
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:-
@coderabbitai explain this code block. -
@coderabbitai modularize this function.
-
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:-
@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase. -
@coderabbitai read src/utils.ts and explain its main purpose. -
@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format. -
@coderabbitai help me debug CodeRabbit configuration file.
-
Support
Need help? Create a ticket on our support page for assistance with any issues or questions.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (Invoked using PR comments)
-
@coderabbitai pauseto pause the reviews on a PR. -
@coderabbitai resumeto resume the paused reviews. -
@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository. -
@coderabbitai full reviewto do a full review from scratch and review all the files again. -
@coderabbitai summaryto regenerate the summary of the PR. -
@coderabbitai generate docstringsto generate docstrings for this PR. -
@coderabbitai generate sequence diagramto generate a sequence diagram of the changes in this PR. -
@coderabbitai resolveresolve all the CodeRabbit review comments. -
@coderabbitai configurationto show the current CodeRabbit configuration for the repository. -
@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This PR was closed because it has been stalled for 5 days with no activity.