state,授权回调时校验 state 并在「授权登录」或「绑定授权账号」接口中提交。action=bind 时必须携带登录令牌。业务失败(驱动不存在、授权 state 无效或已过期、三方账号授权失败等)时 HTTP 状态码为 200,status 为 error。curl --location 'http://127.0.0.1:8000/api/v2/oauth/2/redirect?redirect_url=http%3A%2F%2F127.0.0.1%3A8000%2Flogin%3Fdriver_id%3D2&action=login' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{token}}'{
"status": "success",
"message": "successful",
"data": {
"redirect_url": "https://github.com/login/oauth/authorize?client_id=6d2d7c8f64c2eb90630a&redirect_uri=http%3A%2F%2F127.0.0.1%3A8000%2Flogin%3Fdriver_id%3D2&scope=read%3Auser&response_type=code&state=Xk2v9QeR7tLmN3pA8sDfG4hJ6kZx1cVb5nM0qWeRtYuIoPaSdFgHjKlZxCvBnMq1",
"state": "Xk2v9QeR7tLmN3pA8sDfG4hJ6kZx1cVb5nM0qWeRtYuIoPaSdFgHjKlZxCvBnMq1"
},
"time": 1761220800
}