Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[change] Allowed showing failure messages coming from captive portal #604 #838

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

praptisharma28
Copy link
Member

@praptisharma28 praptisharma28 commented Dec 26, 2024

#604

Closes #604

Checklist

  • I have read the OpenWISP Contributing Guidelines.
  • I have manually tested the changes proposed in this pull request.
  • I have written new test cases for new code and/or updated existing tests for changes to existing code.
  • I have updated the documentation.

Reference to Existing Issue

Closes #604 .

Description of Changes

  • Added captive-portal-handler.js to handle authentication failure detection and error messaging.
  • When a captive portal authentication fails, it redirects back to the login page.

Also:

  • By changing to:

import LoginComponent from "../login";

  • We're getting the default export (the connected component) and there's no ambiguity about which version we're using as I was getting ESLint error

@praptisharma28 praptisharma28 changed the base branch from captiveportal to master December 26, 2024 11:35
@praptisharma28 praptisharma28 changed the title [tests] Added tests for captive-portal handler #604 [change] Allowed showing failure messages coming from captive portal #604 Dec 26, 2024
Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the wait @praptisharma28, this has been buried under a pile of open PRs.

What steps can we do to manually test this?

Can you add at least one screenshot to the PR description or to a reply here please?

See my comment below.

@@ -12,7 +12,7 @@ import Footer from "../footer";
import Header from "../header";
import Loader from "../../utils/loader";
import needsVerify from "../../utils/needs-verify";
import Login from "../login";
import LoginComponent from "../login";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand where this LoginComponent is coming from. Is this some naming convention in react or what? I can't see the definition of this class.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#838 (comment)

@nemesifier here I have mentioned that I was getting an ESlint error, but what error in particular, I don't remember as it's been long. Got a new laptop hence need to set it up again and check, will let you know today itself.

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.

[change] Allow showing failure messages coming from captive portal
2 participants