I don't really understand how it works internally, so wondering if it's safe to rely on a value stored as a session storage variable.
More specifically, I am authorizing one user to do certain actions on behalf of another user, and the currently assumed user is stored in session.user (even if auth.user_id is somebody else).
If somebody can hack session and change the value of session.user - it would be potentially dangerous situation, so if it's not safe - I would have to figure out something else.It's just easy and tempting to use some variables in a session.
Any ideas on how safe it is?
p.s. I don't care if somebody can read it - my only concern is that they shouldn't be able to overwrite it, because this would give them authority to perform certain actions.