修复:钱包登录 SIWE statement 使用固定 ASCII,避免非英文语言解析失败。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
bd698067f8
commit
4f695953d3
@ -160,8 +160,7 @@
|
||||
"loginFailed": "Sign in failed. Please check your credentials and try again.",
|
||||
"credentialsRequired": "Please enter username and password.",
|
||||
"captchaRequired": "Please enter the captcha.",
|
||||
"captchaLoadFailed": "Failed to load captcha. Please refresh and try again.",
|
||||
"siweStatement": "Sign in to FuturePulse"
|
||||
"captchaLoadFailed": "Failed to load captcha. Please refresh and try again."
|
||||
},
|
||||
"register": {
|
||||
"title": "Sign Up",
|
||||
|
||||
@ -160,8 +160,7 @@
|
||||
"loginFailed": "サインインに失敗しました。認証情報を確認してください。",
|
||||
"credentialsRequired": "ユーザー名とパスワードを入力してください。",
|
||||
"captchaRequired": "認証コードを入力してください。",
|
||||
"captchaLoadFailed": "認証コードの読み込みに失敗しました。更新して再試行してください。",
|
||||
"siweStatement": "FuturePulse にサインイン"
|
||||
"captchaLoadFailed": "認証コードの読み込みに失敗しました。更新して再試行してください。"
|
||||
},
|
||||
"register": {
|
||||
"title": "新規登録",
|
||||
|
||||
@ -160,8 +160,7 @@
|
||||
"loginFailed": "로그인에 실패했습니다. 계정 정보를 확인해 주세요.",
|
||||
"credentialsRequired": "사용자 이름과 비밀번호를 입력해 주세요.",
|
||||
"captchaRequired": "인증 코드를 입력해 주세요.",
|
||||
"captchaLoadFailed": "인증 코드를 불러오지 못했습니다. 새로고침 후 다시 시도해 주세요.",
|
||||
"siweStatement": "FuturePulse 로그인"
|
||||
"captchaLoadFailed": "인증 코드를 불러오지 못했습니다. 새로고침 후 다시 시도해 주세요."
|
||||
},
|
||||
"register": {
|
||||
"title": "회원가입",
|
||||
|
||||
@ -160,8 +160,7 @@
|
||||
"loginFailed": "登录失败,请检查账号密码后重试。",
|
||||
"credentialsRequired": "请输入用户名和密码。",
|
||||
"captchaRequired": "请输入验证码。",
|
||||
"captchaLoadFailed": "验证码加载失败,请刷新后重试。",
|
||||
"siweStatement": "登录 FuturePulse"
|
||||
"captchaLoadFailed": "验证码加载失败,请刷新后重试。"
|
||||
},
|
||||
"register": {
|
||||
"title": "注册",
|
||||
|
||||
@ -160,8 +160,7 @@
|
||||
"loginFailed": "登入失敗,請檢查帳號密碼後重試。",
|
||||
"credentialsRequired": "請輸入使用者名稱和密碼。",
|
||||
"captchaRequired": "請輸入驗證碼。",
|
||||
"captchaLoadFailed": "驗證碼載入失敗,請刷新後重試。",
|
||||
"siweStatement": "登入 FuturePulse"
|
||||
"captchaLoadFailed": "驗證碼載入失敗,請刷新後重試。"
|
||||
},
|
||||
"register": {
|
||||
"title": "註冊",
|
||||
|
||||
@ -106,6 +106,9 @@ import { useUserStore } from '@/stores/user'
|
||||
import { post } from '@/api/request'
|
||||
import { getCaptcha, loginByPassword, parseLoginResponse, type LoginResponseData } from '@/api/auth'
|
||||
|
||||
// EIP-4361 只允许可打印 US-ASCII 的 statement,不能本地化
|
||||
const SIWE_STATEMENT = 'Sign in to FuturePulse'
|
||||
|
||||
const router = useRouter()
|
||||
const { t } = useI18n()
|
||||
const userStore = useUserStore()
|
||||
@ -213,7 +216,7 @@ const connectWithWallet = async () => {
|
||||
scheme,
|
||||
domain,
|
||||
address: signer.address,
|
||||
statement: t('login.siweStatement'),
|
||||
statement: SIWE_STATEMENT,
|
||||
uri: origin,
|
||||
version: '1',
|
||||
chainId: chainId,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user