为什么“使用以太坊登录”会改变游戏规则?它对Web3的构建者来说,意味着什么?

SprucePublished on 2022-03-02Last updated on 2022-03-02

Abstract

用户现在可以使用控制其区块链帐户的相同密钥登录,而不是提交“大登录”,并且无需中间人。 这种方法有希望但不能保证重新平衡有利于用户的功率动态。

使用以太坊登录(Sign-In with Ethereum)是互联网上用户选择的游戏规则改变者。

用户现在可以使用控制其区块链帐户的相同密钥登录,而不是提交“大登录”,并且无需中间人。 这种方法有希望但不能保证重新平衡有利于用户的功率动态。 通过使用以太坊登录,我们开辟了一条道路,让大公司不再能够剥夺用户访问服务的能力,也不能监视他们的行为。

使用以太坊登录是一种完全公开开发的身份验证开放标准,通过与 dapp、应用程序、钱包、安全公司等社区成员的公开讨论获得信息。 您可以在 login.xyz 上找到所有会议记录和笔记。 这种方法与科技巨头或政府供应商中发现的专有身份系统的封闭式开发相去甚远,这种封闭式开发受到了隐私和数字权利倡导者的正当抗议。

相比之下,使用以太坊登录 (EIP-4361) 为以太坊帐户定义了一种开放的知识共享 (CC) 签名格式,以安全地使用任何基于 Web 的服务进行身份验证。 它是由社区在以太坊基金会和 ENS 的直接支持下建立的,去年年底 Spruce 被任命为领导者。 我很高兴与以太坊讨论登录的重要性,以及它对于 Web3 中的所有构建者来说不仅仅是“连接钱包”。

连接钱包vs登录

“连接钱包(Connect Wallet)”按钮是当今 dapps 的主要接入方式。点击按钮开始进入 Web3 和区块链交互的旅程。

但是,连接钱包可以让您告诉应用程序您知晓正在使用哪个帐户,并且保证到此为止。您的钱包更需要了解您想使用哪个帐户与智能合约交互、发送加密货币,甚至通过 dapp 签署消息。连接钱包是非常基础的——dapp 不会记住任何关于你的信息,并且正在为简单的交互建立一个前台。

应用程序想要与用户进行更丰富的上下文交互时,例如加载他们的偏好或私人聊天消息,我们需要首先确保我们正在与帐户背后的实际密钥持有者交谈,而不是假装控制帐户的人。 “连接钱包”不提供此保证,但使用以太坊登录 (SIWE) 提供。换句话说,我们需要对用户进行身份验证以与他们建立会话以安全地读取和写入他们的数据。对于这个例子,我想介绍一下 Connected Carl 和 Session Sam:

Connected Carl 使用 dapps 并且玩得很开心。他可以在 Uniswap 上进行交易,在 Aave 上借贷,甚至在 OpenSea 上购买 NFT,只需连接他的钱包。有一段时间,Carl 的事情进展顺利,直到有一天,他遇到了一个问题:他希望这些 dapp 能记住一些关于他的事情,以便在他第三次、第四次和第五次使用它们时给他更好的体验.

Carl 正在考虑如果 Uniswap 自动导入他的清算偏好,Aave 记住他最喜欢的借贷市场,甚至 OpenSea 记住他的名字而不是 0x2Fe1a3... 帐户,他的体验会好多少。每次连接钱包时,Carl都必须从第一格重新开始。

Session Sam 没有这个问题。在使用 dapps 进行身份验证并建立会话后,此信息将被保存。即使 Sam 断开连接并再次进行身份验证,Sam 仍会从他离开的地方继续,并且仍然会在应用程序中记住关于他的所有内容。他的信息甚至可以保存在他控制的远程数据保险库中。

统一使用以太坊登录

在 Web3 中,您会发现许多现有服务提供某种形式的“使用以太坊登录”,但没有多少符合标准。 他们通常会使用它与可以管理有关帐户的特权元数据的用户建立基于 cookie 的会话。 例如,如果您想让用户能够在您的网站上自定义他们自己的配置文件(例如 OpenSea),您应该在用户进行任何更改之前对用户进行身份验证,确保只有用户可以编辑他们自己的配置文件。 其工作流程如下所示:

连接钱包后的第一步是为用户提供人类可读的信息,以便他们了解自己正在进入什么状态。 有很多情况下,用户会看到“登录(LOGIN)”,一些关于“登录”的不一致的措辞,甚至有时只是一个任意数字(“在这里,签署这组随机的疯狂字母和数字”)。 相反,我们可以根据现有的实践、一些良好的安全措施以及在人类可读性和安全性之间取得平衡的严格语法来定义一组必填字段。 此外,钱包不必改变其现有的界面和做法,至少可以继续为用户提供这种信息。

我们可以首先获取所有这些混乱的“使用以太坊登录”消息,并采用一种公认的通用方式向用户展示请求:

通用消息——通用接口

通过商定的签名消息格式,应用程序和钱包现在可以使用相同的语言。 当应用程序向用户提出签名请求时,钱包可以检查该请求,检查它是否适合作为 EIP-4361 消息,并让用户知道他们正在登录网站。

在这一点上,钱包可以呈现一个友好的风格化界面,让用户感觉良好,并消除对用户将要采取的行动的任何疑虑,而不是向用户呈现任意文本块以进行签名。 用户现在只需点击确认对话框即可“登录”,因为钱包理解签名请求。 为了完全透明,规范声明整个消息和字段仍必须在其他子界面(例如详细视图)中可用。

从 EIP-4361 消息中,我们现在得到了一个更简洁的界面:

该规范还为钱包引入了额外的安全要求,例如防止网络钓鱼攻击的域绑定和防止重放攻击的随机数,在整个体验过程中进一步保护用户。 例如,如果钱包找到有效的 SIWE 消息,但用户正在为 example.com 签名,但实际上是在 exampie.com 上,则钱包可以警告用户以下情况:

超越身份验证

使用以太坊消息登录也可以解释为对访问特定资源的授权,或对会话密钥的委托,以增加功能和围绕 dapp UX 的易用性。 例如,想象一个世界,用户可以使用他们保留的数据来丰富他们的会话,而不是应用程序保存用户的数据? 有关更多信息,我们强烈建议您查看以下内容:https://blog.spruceid.com/from-sign-in-with-ethereum-to-session-keys/

Trending Cryptos

Related Reads

The Verdict in Choi Tae-won's Divorce Case: Revealing the Inheritance Undercurrent Behind SK Hynix's Trillion-Won Empire

SK Group Chairman Chey Tae-won's high-profile divorce case, involving a record 1.38 trillion won settlement, has drawn attention to the succession plans for Korea's second-largest conglomerate, especially its crown jewel, SK hynix. Unlike traditional chaebol scripts centered on the eldest son, Chey's three children from his marriage to former President Roh Tae-woo's daughter, Roh Soh-yeong, are carving distinct, non-traditional paths. Eldest daughter Chey Yun-jung (b. 1989) is seen as the most evident successor. With a scientific and consulting background, she holds executive roles at SK bioscience and SK Inc.'s growth support department, focusing on future strategy and biopharma. Her marriage is to an AI infrastructure entrepreneur, not a traditional business alliance. Second daughter Chey Min-jung (b. 1991) took a unique route, voluntarily serving as a South Korean naval officer, including an anti-piracy deployment. She later worked on policy and strategy for SK hynix in Washington D.C. before co-founding an AI-driven healthcare startup. She married a former U.S. Marine Corps officer, connecting her to U.S. defense and policy circles—networks crucial for a global semiconductor giant. The only son, Chey In-geun (b. 1995), who studied physics like his father, worked briefly at SK E&S before joining McKinsey. Despite fitting the traditional "heir" profile as the eldest son, he remains silent and holds no public position or shares in SK, suggesting the old succession playbook is obsolete. As SK hynix's valuation soars, becoming a geopolitical asset in the AI era, the heirs' legitimacy is no longer automatic. They must prove themselves in fields like AI biotech, global policy, and strategic consulting. Their marriages also reflect new elite networks in tech and defense, not old political alliances. Their inheritance is the complex challenge of navigating a globalized, tech-driven world, not just a corporate throne.

marsbit2 days ago 09:06

The Verdict in Choi Tae-won's Divorce Case: Revealing the Inheritance Undercurrent Behind SK Hynix's Trillion-Won Empire

marsbit2 days ago 09:06

From OpenSea to OpenRouter: Is Alex Atallah Repeating His 'Exit at the Peak' Playbook?

From OpenSea to OpenRouter: Is Alex Atallah Repeating His "Exit at the Peak" Playbook? According to the Wall Street Journal, payments giant Stripe is in talks to acquire the AI model aggregation platform OpenRouter in a potential deal valuing the company near $100 billion. This would mark founder Alex Atallah's second creation of a company reaching a $100 billion valuation, following his co-founding of NFT marketplace OpenSea. OpenRouter, founded just over three years ago, has grown rapidly by acting as a unified gateway for developers to access over 400 AI models. It currently has about 10 million users and processes over 200 trillion tokens monthly. While the platform's annualized revenue is around $50 million, its valuation has skyrocketed from $1.3 billion in March 2026. The potential acquisition by Stripe, a company OpenRouter's founder once likened it to, represents a major expansion into AI infrastructure for the payments leader. This move echoes Atallah's previous timing with OpenSea, where he departed before the NFT market's significant downturn. For OpenRouter, selling now may be strategic. Despite its scale, its business model—charging a 5-5.5% fee on AI inference calls—faces pressure from competition, open-source models, and potential price wars among model providers, limiting its profitability narrative for an IPO. A key asset for potential acquirers like Stripe is OpenRouter's vast repository of real-world AI usage data, which offers unique insights into model performance and developer preferences that are difficult to replicate. Whether this potential deal signifies a new valuation benchmark for AI infrastructure or another market peak signal remains to be seen.

链捕手2 days ago 08:42

From OpenSea to OpenRouter: Is Alex Atallah Repeating His 'Exit at the Peak' Playbook?

链捕手2 days ago 08:42

Trading

Spot

Hot Articles

Discussions

Welcome to the HTX Community. Here, you can stay informed about the latest platform developments and gain access to professional market insights. Users' opinions on the price of ETH (ETH) are presented below.

活动图片