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

Missing status when warden redirects #189

Open
michaelbaisch opened this issue Dec 1, 2021 · 4 comments
Open

Missing status when warden redirects #189

michaelbaisch opened this issue Dec 1, 2021 · 4 comments

Comments

@michaelbaisch
Copy link
Contributor

Hello again,

looking at entries with process_action == hook, I noticed that the status is missing for entries that were redirected with the warden middleware. For redirects within my application with redirect_to, status is correctly set to 302.

I'm not too familiar warden and influxdb-rails/ActiveSupport::Notifications, but my guess is that it's due to the fact that it's another middleware.

If I understand correctly this is the code that does the actual redirect when a user is for example not authenticated:
https://github.com/heartcombo/devise/blob/main/lib/devise/failure_app.rb

Greetings,
Michael

@ChrisBr
Copy link
Collaborator

ChrisBr commented Dec 1, 2021

So the entry is there but with the wrong status?

@ChrisBr
Copy link
Collaborator

ChrisBr commented Dec 1, 2021

Can you provide the Rails and devise versions you're using?

@michaelbaisch
Copy link
Contributor Author

Yes the entry is there but status is empty. I also just noticed that request_id is also empty, that's maybe related.

rails (6.1.4.1)
devise (4.8.0)

@ChrisBr
Copy link
Collaborator

ChrisBr commented Dec 1, 2021

request_id is empty because it's set by a monkey patch in the application controller which we never hit in this case. The status is pulled from the process-action-action-controller event which we seem to receive just without the status.

I will have a look into it but at this point I'm not sure we can do much about this 🤔

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

No branches or pull requests

2 participants