POST /auth/login/phone-code
使用手机验证码进行免密登录,支持自动注册
身份认证 None application/json
Request Body
Schema: dto.LoginByPhoneCodeRequest
| Field | Type | Required | Example | Constraints | Description |
code |
string |
Yes |
|
|
|
phone |
string |
Yes |
|
|
|
captcha_token |
string |
No |
|
|
|
register_if_new |
boolean |
No |
|
|
|
tenant_id |
string |
No |
|
|
|
Referenced Schemas
dto.LoginByCodeResponse
| Field | Type | Required | Example | Constraints | Description |
access_token |
string |
No |
|
|
|
expires_in |
integer |
No |
|
|
|
is_new_user |
boolean |
No |
|
|
|
refresh_token |
string |
No |
|
|
|
token_type |
string |
No |
|
|
|
user |
dto.UserInfo |
No |
|
|
|
dto.UserInfo
用户基本信息
| Field | Type | Required | Example | Constraints | Description |
created_at |
string |
No |
|
|
Account creation time |
email |
string |
No |
|
|
Email |
id |
string |
No |
|
|
User ID |
must_change_password |
boolean |
No |
|
|
Password must be changed |
password_expires_in |
integer |
No |
|
|
Days until password expires |
password_warning |
string |
No |
|
|
Password warning: expiring/expired_grace/expired |
phone |
string |
No |
|
|
Phone |
status |
string |
No |
|
|
Status |
username |
string |
No |
|
|
Username |