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

report failed basic auth #454

Merged
merged 4 commits into from
Mar 17, 2021

Conversation

leastbad
Copy link
Contributor

@leastbad leastbad commented Feb 10, 2021

Type of PR (feature, enhancement, bug fix, etc.)

Enhancement

Description

If developers use HTTP basic auth, SR will have trouble running controller actions. This PR checks for HTTP 401 status and will return a helpful log message suggesting that they add unless: -> { @stimulus_reflex } to their controller's class method.

Note that this check will only happen if a controller instance has been created in the Reflex class, eg. a Page Morph. Otherwise, checking the memoized controller method will create a controller instance!

Fixes #453

Why should this be added

SR has your back.

Checklist

  • My code follows the style guidelines of this project
  • Checks (StandardRB & Prettier-Standard) are passing
  • This is not a documentation update

@leastbad leastbad added enhancement New feature or request proposal ruby Pull requests that update Ruby code security labels Feb 10, 2021
Copy link
Member

@marcoroth marcoroth left a comment

Choose a reason for hiding this comment

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

This looks good from my end as soon as the conflicts are resolved! 🎉

@leastbad leastbad merged commit 8e4c63e into stimulusreflex:master Mar 17, 2021
@leastbad leastbad deleted the report_failed_basic_auth branch March 17, 2021 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request proposal ruby Pull requests that update Ruby code security
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Page morphs fail to refresh (blank operations hash) in Safari/Edge on staging
2 participants