nodeSolidServer / oidc-auth-manager

An OpenID Connect (OIDC) authentication manager (OP, RP and RS) for decentralized peer-to-peer authentication
MIT License
23 stars 9 forks source link

Add findUserByEmail #55

Closed ianconsolata closed 4 years ago

ianconsolata commented 4 years ago

This index already exists, there is just no way to read from it.

ianconsolata commented 4 years ago

Not at all! Testing has actually gotten me thinking more about how this should work. Right now I think the delete functionality is a little weird and could result in the indexes getting out of sync. It currently only deletes things from the index based on the info provided. For example, if I give it only the id of a user, it will only delete the entry in the user index, not the email index, even if the object stored in the user index has an email attached. Does that make sense?

Happy to change the delete functionality so they stay in sync too if you think it's important. My basic approach would be to use the id / email provided, look it up in the first index, and then use the found user to look it up in the other index.

michielbdejong commented 4 years ago

Oh hi Ian, I hadn't realised this was you. Great! Sorry, this PR had slipped through my inbox last month. I found it back today while cleaning up my https://github.com/pulls/review-requested.

michielbdejong commented 4 years ago

Thanks for adding the unit test!

michielbdejong commented 4 years ago

Thanks for this. We should catch up soon! :)