lil-lab / recnet

A human-driven recommendation system for academic readings.
https://recnet.io
MIT License
3 stars 1 forks source link

Create user-specific random seed #37

Closed yoavartzi closed 11 months ago

yoavartzi commented 11 months ago

Each user record should include a user specific random seed. The seed should be generated randomly when the profile is created, and saved with the user profile. The seed is not visible to the user and cannot be modified.

This seed will be used for randomization purposes later on, such as in #36

anya-ji commented 11 months ago

I think I could probably just use the userId as seed since the Chance package seems to be able to take a string as a seed?: https://chancejs.com/usage/seed.html

yoavartzi commented 11 months ago

Interesting ID, but the ID can be changed, and I am not sure we want to lists to change in response to it. It will be weird and unexpected.

yoavartzi commented 11 months ago

Interesting ID, but the ID can be changed, and I am not sure we want to lists to change in response to it. It will be weird and unexpected.

anya-ji commented 11 months ago

Oh by ID I mean the hashed uid returned by Google so it's not going to change for each user

yoavartzi commented 11 months ago

Will this be an issue if we support other authentication providers? Do they all provide some fixed id? At some point, we will probably want to expand, and maybe even allow to migrate accounts between authentication providers.

Maybe we should use the hashed uid for now, but copy it to another field in the database, so it's fixed, but separate.

anya-ji commented 11 months ago

Ohh I see, all providers supported by Firebase (GitHub, Twitter, Microsoft, etc.) should give a uid for each account, but if we want multiple providers / other provider such as orcid for each user, I'm thinking maybe we should create a recnet specific id for each user (and that recnet id should be safe to be used as a seed)