Storing anything like that client side means cookies - and that means two things:
1) you need to get permission first, just like every other site that won't shut up until you let them store cookies on your machine.
2) It's not particularly secure, though you can use Secure cookies
] which improve it a little, any form of "local storage" is intrinsically less secure than a system where such info never leaves the server.
Most sites don't store personal info on the client: they store it on the server and store a key value on the client which allows them to access the user info on the server when needed - in your case, the user_id is probably the best choice.
Remember, all personal info is covered by GDPR, and the fines for taking insufficient care can be staggeringly huge!