S
SolidJS16mo ago
Massukka

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