go-openbbsmiddleware icon indicating copy to clipboard operation
go-openbbsmiddleware copied to clipboard

token expire 時要回傳 401, 不是偷偷變成 guest

Open chhsiao1981 opened this issue 2 years ago • 0 comments

Describe the bug

現在機制是 token expire 時會偷偷變成 guest~ 但是如此會導致 user / frontend 的設定 (原本的 user) 和 backend (guest) 不一樣~

需要改成直接 return 401~

To Reproduce

Expected behavior

Screenshots

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

https://github.com/Ptt-official-app/go-openbbsmiddleware/blob/main/api/api_login_required.go#L44

chhsiao1981 avatar Oct 11 '23 08:10 chhsiao1981