AlistGo / AlistGo/alist

登录接口返回token有效期

Đang mở
#7,888 6 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
Go
Star
50.2k
Fork
7.9k
Merge trung bình
7 ngày 21 giờ
Pull request đã merge (30 ngày)
6

Mô tả

### Please make sure of the following things

- [x] I have read the [documentation](https://alist.nn.ci).
- [x] I'm sure there are no duplicate issues or discussions.
- [x] I'm sure this feature is not implemented.
- [x] I'm sure it's a reasonable and popular requirement.

### Description of the feature / 需求描述

在api/auth/login/hash接口中返回token有效期
封装了个接口登录获取token后设置cookie保存token但是不知道有效期多久,导致过期了接口返回{"code":401,"message":"token is invalidated","data":null}
用cookie保存token是为了减少该接口的请求次数

### Suggested solution / 实现思路

在返回数据中加一个token有效期的字段 秒为单位

### Additional context / 附件

接口: api/auth/login/hash
![Screenshot_2025-01-27-22-57-31-071_com.reqable.android.jpg](https://github.com/user-attachments/assets/806792a2-a424-4581-9ff1-56a70ff07a85)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.