What to save to database with authjs to preserve privacy?
Basically authjs with most oauth providers gives for example name or email as a scope. But I dont want their email address or name saved on my database. Whats should i do to prevent me the admin from having access to private information, but still allow the user to authorize for example delete their data on my server? Or am I completely off base on how this oauth stuff works in the first place?
4 Replies
For oauth, you need some form of user id. That can be a number or an arbitrary string.
Could I for example hash user name I get from provider and then save it in database? None of the providers seem to deliver anonymous id as scope.
Sure.
Thanks, I think I got it from here!