API DocsAPI Docs
POST/api/auth/username/login
用户名登录
POST/api/auth/phone/login
手机号登录
POST/api/auth/phone/sendVerification
发送手机验证码
POST/api/auth/email/sendVerification
发送邮箱验证码
POST/api/auth/logout
用户登出
POST/api/auth/password/change
修改密码
GET/api/auth/wechat/login
微信登录
GET/api/auth/wechat/authCallback
微信授权回调
GET/api/auth/token
通用令牌检查接口
POST/api/auth/wechat/binding
绑定微信账号
POST/api/auth/email/login
邮箱验证码登录
POST/api/auth/username/login
用户名登录
POST/api/auth/phone/login
手机号登录
POST/api/auth/phone/sendVerification
发送手机验证码
POST/api/auth/email/sendVerification
发送邮箱验证码
POST/api/auth/logout
用户登出
POST/api/auth/password/change
修改密码
GET/api/auth/wechat/login
微信登录
GET/api/auth/wechat/authCallback
微信授权回调
GET/api/auth/token
通用令牌检查接口
POST/api/auth/wechat/binding
绑定微信账号
POST/api/auth/email/login
邮箱验证码登录
get/api/auth/wechat/authCallback
get/api/auth/wechat/authCallback
微信授权回调
Basic Information
Request Method:
get
Request URL:
https://www.lycoo.com/api/auth/wechat/authCallback
Tags:
用户认证
Description
处理微信授权后的回调,接收授权码,获取访问令牌和OpenID。
注意: 此接口通常不直接由前端调用,而是由微信服务器在用户授权后自动调用。
Query Parameters
Query Parameters Explanation
Query parameters are added at the end of the URL, starting with a question mark, for example:
https://www.lycoo.com/api/auth/wechat/authCallback?code=example&state=example
Parameter Name | Type | Required | Example Value | Description |
---|---|---|---|---|
code | string | Required | example | 微信授权码 |
state | string | Required | example | 状态码,用于防止CSRF攻击和关联重定向URL |
Response Example
302授权成功,重定向到前端指定的URL,并设置cookie
400授权失败,参数错误
401授权失败,微信API返回错误
500