What is the best way to uniquely identify a user starting from the data inside the JWT payload?
I will not use the email address alone (or a salted hash of it for that matter) as the primary key of the user account, as I'm not certain if doing this is really secure.
Is it okay to use a concatenation of the user_id and the provider_id separated by a special character? Is this concatenation guaranteed to be unique among all "big" and "honest" providers (I don't know if rouge providers could do bad things)? Or a concatenation of the email address and the provider_id?