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
Alex Lohr
Alex Lohr2y ago
For oauth, you need some form of user id. That can be a number or an arbitrary string.
Massukka
Massukka2y ago
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.
Alex Lohr
Alex Lohr2y ago
Sure.
Massukka
Massukka2y ago
Thanks, I think I got it from here!
Want results from more Discord servers?
Add your server
More Posts