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

Clarity on how Fields.EmailHash can be used to look up a user by their email address. #169

Open
tadasajon opened this issue Dec 22, 2021 · 4 comments
Labels
please-test Please test the feature in Staging Environment and confirm it's working as expected. question A question needs to be answered before progress can be made on this issue technical A technical issue that requires understanding of the code, infrastructure or dependencies

Comments

@tadasajon
Copy link

Screen Shot 2021-12-22 at 4 50 46 PM

The value that I am passing in to this function is a normal email address, like "firstname.lastname@gmail.com" -- but then this plain email is used to try to find the user by their email_hash -- since I haven't hashed the email address, how is this supposed to work?

Instead of

|> Repo.get_by(email_hash: email)

I would expect

|> Repo.get_by(email: email)

but of course this won't work either because the email address is apparently encrypted...

So I guess I'd like clarity on what is going on behind the scenes such that this code is expected to work. Is there some black magic in the Fields library? If so, what is it?

Thanks!

@tadasajon
Copy link
Author

Screen Shot 2021-12-22 at 4 55 32 PM

@nelsonic nelsonic added question A question needs to be answered before progress can be made on this issue technical A technical issue that requires understanding of the code, infrastructure or dependencies labels Dec 22, 2021
nelsonic added a commit to dwyl/fields that referenced this issue Dec 27, 2021
@nelsonic
Copy link
Member

@nelsonic nelsonic added please-test Please test the feature in Staging Environment and confirm it's working as expected. awaiting-review An issue or pull request that needs to be reviewed and removed please-test Please test the feature in Staging Environment and confirm it's working as expected. labels Jan 2, 2022
@SimonLab
Copy link
Member

The PR dwyl/fields#92 is now merged.

@SimonLab SimonLab added please-test Please test the feature in Staging Environment and confirm it's working as expected. and removed awaiting-review An issue or pull request that needs to be reviewed labels Jan 28, 2022
@nelsonic
Copy link
Member

Hi @tadasajon hope you are well. I've attempted to answer your question in: https://github.com/dwyl/fields#questions
Please let me know if that clarifies it. 🤞
Thanks. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
please-test Please test the feature in Staging Environment and confirm it's working as expected. question A question needs to be answered before progress can be made on this issue technical A technical issue that requires understanding of the code, infrastructure or dependencies
Projects
None yet
Development

No branches or pull requests

3 participants