You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用@clerk/clerk-expo发送邮箱验证时遇client_state_invalid错误

Clerk/Expo 邮箱验证请求返回client_state_invalid错误

问题场景

在Android环境下,使用Clerk/Expo完成用户注册流程时,signUp.create方法执行正常,但调用返回对象的prepareEmailAddressVerification方法发送邮箱验证时触发错误。

相关代码

try {
  const signupResponse = await signUp.create({
       firstName,
       lastName,
       emailAddress,
       password,
     });
     const response = await signupResponse.prepareEmailAddressVerification({
       strategy: "email_code",
     });
} catch (err: any) {
     console.error(JSON.stringify(err, null, 2));
}

错误信息

{
  "status": 400,
  "clerkError": true,
  "errors": [
    {
      "code": "client_state_invalid",
      "message": "Invalid action",
      "longMessage": "We were unable to complete a get for this Client. No sign up.",
      "meta": {}
    }
  ]
}

排查尝试

  • 直接使用signUp.create返回的对象调用验证方法,仍返回相同错误

解决方法

在Clerk控制面板重新创建新的Clerk实例后问题解决,推测是此前修改了Clerk后台中不应更改的配置项导致该错误。

内容的提问来源于stack exchange,提问作者beto

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.29 22:48:14