Hello to who may be reading this, thanks for your help in advance!
I have an app based around crypto wallets & their NFTs with which moralis has helped a lot!
I have a concern regarding security, currently I ask all users to sign the same message, which (the signature hash) I store in their cookies with sameSite strict, and secure attributes set.
Whenever I want to auth the users for certain actions, I check their cookies, if they have a signature hash I decode it, if their public key matches the one metamask claims they are, I authorize the action.
I’ve seen moralis has an auth feature with nonces & everything, which to be honest seems a bit overkill, especially at this point.
My questions are, what exactly would I be vulnerable to with this approach?
The only issue I see is if someone steals the users private key, (in which case its all over anyways)
OR someone steals the cookie contents (signature hash, stored unencrypted inside cookies) and then poses as that someone with those cookies, but isn’t this very difficult to do with the attributes sameSite & secure?
How would a nonce/or moralis auth improve this?
I am not saying my method is better of fail-proof, just fail to see how it would be ‘very’ vulnerable.
Thank you very much!!