You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "flcrom (via GitHub)" <gi...@apache.org> on 2026/09/24 10:21:40 UTC
[PR] fix(auth): drain flash messages on the login page [superset]
flcrom opened a new pull request, #44605:
URL: https://github.com/apache/superset/pull/44605
### SUMMARY
Flash messages written by Superset and FAB views were never consumed: no code path called get_flashed_messages(). Messages (including failed-login warnings) accumulated in the signed session cookie on every request, growing it until proxies reject the oversized headers with a 502 (#44541). The login page never displayed them either, working around it with a sessionStorage TODO hack.
- Drain the flash queue in the login view and pass the messages to the SPA as per-request bootstrap data (auth_messages), never via the memoized common bootstrap payload.
- The Login page renders them as toasts (danger, warning, info, success by category) and clears the password field on errors; the sessionStorage workaround is removed.
### TESTING INSTRUCTIONS
1. Log out, submit a wrong password repeatedly: before, flash entries accumulate in the session cookie (decode it to see them) and it grows every request; after, each message renders as a toast exactly once and the session stays empty.
2. pytest tests/unit_tests/views/test_auth_login.py
3. cd superset-frontend && npx jest src/pages/Login
### ADDITIONAL INFORMATION
- [x] Has associated issue: Fixes #44541
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(auth): drain flash messages on the login page [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #44605:
URL: https://github.com/apache/superset/pull/44605#discussion_r4131187286
##########
superset/views/auth.py:
##########
@@ -39,7 +39,14 @@ def login(self, provider: Optional[str] = None) -> WerkzeugResponse:
if g.user is not None and g.user.is_authenticated:
return redirect(self.appbuilder.get_url_for_index)
- return super().render_app_template()
+ # Drain pending flash messages (failed logins, session
+ # invalidation, forced password change) so they render here
+ # instead of accumulating in the session. This must go through
+ # per-request extra_bootstrap_data, never the cached common
+ # bootstrap payload, so messages can't bleed between users.
+ return super().render_app_template(
+ {"auth_messages": get_flashed_messages(with_categories=True)}
+ )
Review Comment:
Codeant's off on this one. This view only renders the SPA shell on GET, the actual login POST and provider routes go through Flask-AppBuilder's own auth blueprint, untouched by this diff.
##########
superset-frontend/src/pages/Login/Login.test.tsx:
##########
@@ -319,3 +331,79 @@ test('should use ensureAppRoot for all generated URLs with deep application root
screen.getByRole('link', { name: /Sign in with Google/ }),
).toHaveAttribute('href', '/my-org/superset/login/google');
});
+
+// --- Auth flash messages ---
+
+test('should show flashed auth failures as danger toasts', () => {
Review Comment:
Already renamed a few minutes after this landed (e39309a1), matches the assertions now.
##########
superset-frontend/src/pages/Login/index.tsx:
##########
@@ -115,26 +120,32 @@ export default function Login() {
const authRegistration: boolean =
bootstrapData.common.conf.AUTH_USER_REGISTRATION;
- // TODO: This is a temporary solution for showing login errors after form submission.
- // Should be replaced with proper SPA-style authentication (JSON API with error responses)
- // when Flask-AppBuilder is updated or we implement a custom login endpoint.
+ // Flashed auth messages (failed logins, session invalidation, forced
+ // password change) are drained by the login view into the bootstrap
+ // payload - surface them here, once, on mount.
+ const authMessages = bootstrapData.auth_messages ?? [];
useEffect(() => {
- const loginAttempted = sessionStorage.getItem('login_attempted');
-
- if (loginAttempted === 'true') {
- sessionStorage.removeItem('login_attempted');
- dispatch(addDangerToast(t('Invalid username or password')));
- // Clear password field for security
- form.setFieldsValue({ password: '' });
- }
+ authMessages.forEach(([category, message]) => {
+ if (category === 'success') {
+ dispatch(addSuccessToast(message));
+ } else if (category === 'info' || category === 'message') {
+ dispatch(addInfoToast(message));
+ } else if (category === 'warning') {
+ dispatch(addWarningToast(message));
+ } else {
+ dispatch(addDangerToast(message));
+ }
+ // Clear the password field on auth failures, independent of toast color
+ if (['warning', 'danger', 'error'].includes(category)) {
+ form.setFieldsValue({ password: '' });
Review Comment:
@flcrom fair point, could you add a case that seeds the password field then asserts it clears on an error-category message?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(auth): drain flash messages on the login page [superset]
Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #44605:
URL: https://github.com/apache/superset/pull/44605#issuecomment-5812324588
### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
| Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | a9ab0e2889deb72a06fee1c44e8eb66337f6d8c8 |
|<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6ab4f9b46d383700084acfae |
|<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-44605--superset-docs-preview.netlify.app](https://deploy-preview-44605--superset-docs-preview.netlify.app) |
|<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br /><br /><br />_Use your smartphone camera to open QR code link._</details> |
|<span aria-hidden="true">🤖</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#q1YqKMrPLShRslJS0lFKKkrMS84AstMyK_Rz8tMz83TTchKLM3RTihIz84AKUlILcvIrPVOASswSk0zSLJNMzFKMLYzNDQwMLEwSk9MSU5VqAQ) |
---
<!-- [superset-docs-preview Preview](https://deploy-preview-44605--superset-docs-preview.netlify.app) -->
_To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(auth): drain flash messages on the login page [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on code in PR #44605:
URL: https://github.com/apache/superset/pull/44605#discussion_r4092899285
##########
superset-frontend/src/pages/Login/Login.test.tsx:
##########
@@ -319,3 +331,79 @@ test('should use ensureAppRoot for all generated URLs with deep application root
screen.getByRole('link', { name: /Sign in with Google/ }),
).toHaveAttribute('href', '/my-org/superset/login/google');
});
+
+// --- Auth flash messages ---
+
+test('should show flashed auth failures as danger toasts', () => {
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Misleading test name</b></div>
<div id="fix">
The test name says 'danger toasts', but it seeds a 'warning' flash and asserts `mockAddWarningToast` was called while `mockAddDangerToast` was NOT (lines 345-348). The name contradicts the assertions and will mislead maintainers scanning test titles. Rename to reflect the warning-toast behavior.
</div>
</div>
<small><i>Code Review Run #8570df</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(auth): drain flash messages on the login page [superset]
Posted by "flcrom (via GitHub)" <gi...@apache.org>.
flcrom commented on PR #44605:
URL: https://github.com/apache/superset/pull/44605#issuecomment-5888196251
Added the seeded-password regression case. It keeps the login form mounted, supplies an error-category auth message, and checks that the password clears. The test fails without the clearing logic and passes with it; all 23 Login tests and file lint/format pass locally. Could you take another look?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(auth): drain flash messages on the login page [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #44605:
URL: https://github.com/apache/superset/pull/44605#issuecomment-5812368238
<!-- Bito Reply -->
The flagged issue is incorrect. The code change in `superset/views/auth.py` correctly overrides the `login` method to pass `get_flashed_messages(with_categories=True)` into `render_app_template` as `auth_messages`. This ensures that flash messages (including those from failed login attempts) are correctly drained from the session and passed to the frontend for rendering, maintaining compatibility with the existing authentication flow.
No further action is required to resolve this specific issue.
**superset/views/auth.py**
```
return super().render_app_template(
{"auth_messages": get_flashed_messages(with_categories=True)}
)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(auth): drain flash messages on the login page [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #44605:
URL: https://github.com/apache/superset/pull/44605#issuecomment-5812579629
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/44605?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 65.74%. Comparing base ([`4c229cb`](https://app.codecov.io/gh/apache/superset/commit/4c229cb66a7b6401113ca81f49ee617ad8426e64?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`a9ab0e2`](https://app.codecov.io/gh/apache/superset/commit/a9ab0e2889deb72a06fee1c44e8eb66337f6d8c8?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 59 commits behind head on master.
> :exclamation: There is a different number of reports uploaded between BASE (4c229cb) and HEAD (a9ab0e2). Click for more details.
>
> <details><summary>HEAD has 4 uploads less than BASE</summary>
>
>| Flag | BASE (4c229cb) | HEAD (a9ab0e2) |
>|------|------|------|
>|python|7|3|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #44605 +/- ##
===========================================
- Coverage 80.81% 65.74% -15.07%
===========================================
Files 2945 2952 +7
Lines 177013 178068 +1055
Branches 41052 41245 +193
===========================================
- Hits 143055 117074 -25981
- Misses 31257 58476 +27219
+ Partials 2701 2518 -183
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/44605/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [hive](https://app.codecov.io/gh/apache/superset/pull/44605/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `36.79% <100.00%> (-0.15%)` | :arrow_down: |
| [mysql](https://app.codecov.io/gh/apache/superset/pull/44605/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [postgres](https://app.codecov.io/gh/apache/superset/pull/44605/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [presto](https://app.codecov.io/gh/apache/superset/pull/44605/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `38.69% <100.00%> (-0.19%)` | :arrow_down: |
| [python](https://app.codecov.io/gh/apache/superset/pull/44605/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.84% <100.00%> (-29.32%)` | :arrow_down: |
| [sqlite](https://app.codecov.io/gh/apache/superset/pull/44605/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.71% <100.00%> (-0.21%)` | :arrow_down: |
| [unit](https://app.codecov.io/gh/apache/superset/pull/44605/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/44605?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(auth): drain flash messages on the login page [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #44605:
URL: https://github.com/apache/superset/pull/44605#issuecomment-5816214714
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers an incremental AI Review.
- `/review full` - Manually triggers a full AI Review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(auth): drain flash messages on the login page [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on code in PR #44605:
URL: https://github.com/apache/superset/pull/44605#discussion_r4131188849
##########
superset-frontend/src/pages/Login/Login.test.tsx:
##########
@@ -319,3 +331,79 @@ test('should use ensureAppRoot for all generated URLs with deep application root
screen.getByRole('link', { name: /Sign in with Google/ }),
).toHaveAttribute('href', '/my-org/superset/login/google');
});
+
+// --- Auth flash messages ---
+
+test('should show flashed auth failures as danger toasts', () => {
Review Comment:
<!-- Bito Reply -->
The update to the test name is appropriate. Renaming the test to reflect the warning-toast behavior correctly aligns the test title with the assertions, ensuring clarity for future maintenance.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(auth): drain flash messages on the login page [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #44605:
URL: https://github.com/apache/superset/pull/44605#issuecomment-5883751217
Nice fix for #44541, and solid test coverage on both ends. Codeant's `auth.py` thread looks like a false positive, bito already called that out.
One small ask before this merges: could you add a test asserting the password field actually clears after an auth-failure toast? Copilot's right that only the toast dispatch is covered right now. Otherwise LGTM!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(auth): drain flash messages on the login page [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #44605:
URL: https://github.com/apache/superset/pull/44605#issuecomment-5812493431
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(auth): drain flash messages on the login page [superset]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #44605:
URL: https://github.com/apache/superset/pull/44605#discussion_r4096394878
##########
superset-frontend/src/pages/Login/index.tsx:
##########
@@ -115,26 +120,32 @@ export default function Login() {
const authRegistration: boolean =
bootstrapData.common.conf.AUTH_USER_REGISTRATION;
- // TODO: This is a temporary solution for showing login errors after form submission.
- // Should be replaced with proper SPA-style authentication (JSON API with error responses)
- // when Flask-AppBuilder is updated or we implement a custom login endpoint.
+ // Flashed auth messages (failed logins, session invalidation, forced
+ // password change) are drained by the login view into the bootstrap
+ // payload - surface them here, once, on mount.
+ const authMessages = bootstrapData.auth_messages ?? [];
useEffect(() => {
- const loginAttempted = sessionStorage.getItem('login_attempted');
-
- if (loginAttempted === 'true') {
- sessionStorage.removeItem('login_attempted');
- dispatch(addDangerToast(t('Invalid username or password')));
- // Clear password field for security
- form.setFieldsValue({ password: '' });
- }
+ authMessages.forEach(([category, message]) => {
+ if (category === 'success') {
+ dispatch(addSuccessToast(message));
+ } else if (category === 'info' || category === 'message') {
+ dispatch(addInfoToast(message));
+ } else if (category === 'warning') {
+ dispatch(addWarningToast(message));
+ } else {
+ dispatch(addDangerToast(message));
+ }
+ // Clear the password field on auth failures, independent of toast color
+ if (['warning', 'danger', 'error'].includes(category)) {
+ form.setFieldsValue({ password: '' });
Review Comment:
This adds a security-relevant behavior—clearing the entered password after an authentication error—but the new Login tests only verify toast dispatch and never assert that the password field is emptied. Add a regression test that renders the form with an error-category auth message, seeds the password input, and verifies it is cleared; otherwise this behavior can regress while the suite remains green.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(auth): drain flash messages on the login page [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #44605:
URL: https://github.com/apache/superset/pull/44605#issuecomment-5891673022
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers an incremental AI Review.
- `/review full` - Manually triggers a full AI Review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(auth): drain flash messages on the login page [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #44605:
URL: https://github.com/apache/superset/pull/44605
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(auth): drain flash messages on the login page [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #44605:
URL: https://github.com/apache/superset/pull/44605#discussion_r4092535335
##########
superset/views/auth.py:
##########
@@ -39,7 +39,14 @@ def login(self, provider: Optional[str] = None) -> WerkzeugResponse:
if g.user is not None and g.user.is_authenticated:
return redirect(self.appbuilder.get_url_for_index)
- return super().render_app_template()
+ # Drain pending flash messages (failed logins, session
+ # invalidation, forced password change) so they render here
+ # instead of accumulating in the session. This must go through
+ # per-request extra_bootstrap_data, never the cached common
+ # bootstrap payload, so messages can't bleed between users.
+ return super().render_app_template(
+ {"auth_messages": get_flashed_messages(with_categories=True)}
+ )
Review Comment:
**Suggestion:** The override no longer delegates POST credentials or provider names to Flask-AppBuilder, so password login and OAuth/SAML buttons only render the login page instead of authenticating.
**Assessment:** 🔴 `Critical` · 🔁 `Occurrence: Often` · 🏷️ `Incomplete implementation`
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill) [](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=4ab533ceaeb24aa78d8375bf03d14894&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=4ab533ceaeb24aa78d8375bf03d14894&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset/views/auth.py
**Line:** 47:49
**Comment:**
*Incomplete Implementation: The override no longer delegates POST credentials or provider names to Flask-AppBuilder, so password login and OAuth/SAML buttons only render the login page instead of authenticating.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F44605&comment_hash=3ed3cb16d599cafeb2a5bbe4d5f125e18c041f14bad302b8362c5157473b2b89&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F44605&comment_hash=3ed3cb16d599cafeb2a5bbe4d5f125e18c041f14bad302b8362c5157473b2b89&reaction=dislike'>👎</a>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org