Sign-in with Ethereum, UX Unconference

UX Unconference at Devconnect Amsterdam 2022 · 30 Jun 2022 · 6:38

Gregory Rocco of Spruce introduces Sign-In with Ethereum and the EIP-4361 standard. The talk explains why a bare connect-wallet button remembers nothing about a user, how apps used inconsistent signing messages, and how a common, human-readable, domain-bound message format lets wallets show clear sign-in interfaces and warn about phishing. It closes with open design questions on key management, privacy of on-chain activity and what data to share with apps.

Speakers

Topics

From UX Unconference at Devconnect Amsterdam 2022, hosted by Ethereum DEV NL.

Transcript

[Music] hey everyone i'm rocco from spruce here to present on sign with ethereum um so signing with ethereum was uh never standardized for a very long time and a lot of different apps and services had a way of authenticating users uh by just using their key pairs or their their ethereum accounts and uh recently with the support of the ethereum foundation uh sino with ethereum was standardized um over the course of time but kind of getting into the the meat of it uh a lot of the reason behind the standardization was like how do we allow users to basically own their own identifiers that

they control um unlike signing with google sign with facebook you know all these big login giants together we'll we'll defeat big login um if google were to ever you know pull the rug on you for your gmail account you wouldn't just lose access to all the services you've ever signed into google with you'd also lose access oh sorry you wouldn't just lose access to google services you'd also lose access to everything you signed into google with in this case how do we provide an alternative give users something that they control using their key pairs to authenticate with um kind of going into it specifically some of the main things we focused on when standardizing sign with ethereum were around the web3 space now you may have seen this connect wallet button literally everywhere in

the space um when you just connect a wallet and you establish a connection between the some dap and your wallet it's quite dumb um it doesn't remember anything about a user you can kind of serve the user certain transactions but at the end of the day it can be spoofed which is why when services want to authenticate a session right now they'll typically make you sign a message so on openc for example when you connect your wallet you could do some basic transactions around nfts but the second you want to save some information about yourself such as a profile name or a banner etc they'll make you sign a message to prove you actually own the private key behind that account and it'll typically say you know you're signing into openc you're you know logging into the service

and every different uh dap had a different way of doing it and with this you know just introducing this concept here of connected carl he restarts the game every time so imagine you started a video game you got into it and then the second you kind of closed things out that was it like that was the end of that game the game remembered nothing about you where you ended up what was your last save point whereas we have session sam over here who actually signed the message and authenticated with a service that has some info session information about that user who saved the game basically that remembered things about session sam over here now as mentioned before um different services and apps did this in a variety of different ways and part of the reason for

standardization was to get to that common message format that was served to users that had a couple of goals first was that it was human readable so the user when signing the message even if there weren't custom interfaces yet a user could look at this and say okay it's telling me what i'm doing i'm signing into the service by signing this message that at a base level most wallet clients had some way of serving the user this message that they can read and do something with but actually these these examples on the left were actual examples seen throughout the ecosystem um my personal favorite was just like uh login in all caps just thrown in a wallet at a user and just said yes sign the message in this case it's bringing together all these original formats and giving users

a common format to basically understand what they're doing add a couple of things like including the domain that they're actually accessing including uh you know announce that had at least eight characters for security reasons and even expiration times so the session would expire at a certain point if desired by the app it's very unopinionated now very basically as mentioned before eip4361 was created just literally to get the job done how do we just make that common signing format how do we have a rigid grammar to make sure that nothing malicious could kind of be added to it by some party um and just kind of the list of fields that are required or optional as part of the spec and one of the biggest reasons why it

was standardized was actually for end users so now if wild clients and i'm going to keep calling it all clients because of that first presentation i need to make sure i keep saying that um have a common inter you know have a common standard to follow to then serve interfaces based on that standard because it knows what's coming in it knows a message formatted this way is coming in the wallet can then parse that and if it's a valid seaweed message or valid sign with ethereum message can then serve that custom interface saying you are signing in that it's no longer for the user just you know sign the message to authenticate now it's actually you're signing into the service so the user now knows even more about what they're doing from the wallet side and this gives wallets like okay when we

expect this message format serve this interface to a user rather than just sign the message and other things we get out of this too is things like domain binding so if the user's on a different website than the actual thing they're signing the wall could then warn the user and say hey you're being phished right now don't sign into the service it's malformed et cetera um i think one of those interesting things about all this it's what else can you do with your keys and the whole design space around that that's not just kind of transactions you're not sending money anywhere rather it's all these things around signing and authenticating what else can you do now that you have a key pair with a wallet um and lastly i just kind of want to open it up because we'll probably talk more about this later is a couple open

design questions like key management how do we make managing keys as easy as reset password because users now a lot of them do reset their passwords often and if you lose your private keys it's not a good time public information private keys how do you basically prevent um information leakage when you authenticate with services with a certain wallet to not let that service know certain things about you maybe you're on chain activity how do you like maybe have one key that you use for logging in um what does it look like standardizing those interfaces mounted and then lastly how do we then move on to what data do you share with that app or service when you actually authenticate and this is a very wide open blank canvas and with that thanks a lot thank you very much

[Music] you

Related talks