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

Disable collection of user agent and IP address #138

Closed
dhnaranjo opened this issue May 12, 2023 · 2 comments
Closed

Disable collection of user agent and IP address #138

dhnaranjo opened this issue May 12, 2023 · 2 comments

Comments

@dhnaranjo
Copy link

Hello! So. I don't want to store my users user agent or IP associated with their accounts for privacy reasons. I see that this info isn't actually being used by the library in any way, though the Passwordless::Session model does fail to validate if they aren't present. I can work around this by:

module Authentication
  include Passwordless::ControllerHelpers

  ...

  def build_passwordless_session(user)
    Passwordless::Session.new.tap do |session|
      session.authenticatable = user
      session.user_agent = "N/A"
      session.remote_addr = "N/A"
    end

  ...
end

But honestly this should be something that people should not even really be doing at all, and if they feel they have a specific need it should be an affirmative choice, not something automatic.

Thoughts? If we can agree on a way to solve this I'd be happy to do the work n submit a PR.

@mikker
Copy link
Owner

mikker commented May 13, 2023

Totally agree. It should be removed in 1.0. Your workaround is a good solution until then 👍

@mikker
Copy link
Owner

mikker commented Sep 11, 2023

Closed in #153

@mikker mikker closed this as completed Sep 11, 2023
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