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

"handler/authhandler.go:103","content":"authorize failed: no token present in request

Open Jerry-yz opened this issue 2 years ago • 9 comments

go-zero请求报错, 请问怎么解决这个问题

Jerry-yz avatar Feb 01 '23 03:02 Jerry-yz

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


go-zero request error, how to solve this problem

Issues-translate-bot avatar Feb 01 '23 03:02 Issues-translate-bot

Authentication enabled in server side, but no authentication info in requests.

kevwan avatar Feb 01 '23 04:02 kevwan

第一次用不太懂这里的认证,没有看到认证校验,参数在哪里传递

Jerry-yz avatar Feb 01 '23 05:02 Jerry-yz

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


For the first time, I don’t understand the authentication here, and I haven’t seen the authentication verification. Where are the parameters passed?

Issues-translate-bot avatar Feb 01 '23 05:02 Issues-translate-bot

Don't add Auth in your api file.

kevwan avatar Feb 01 '23 05:02 kevwan

Don't add Auth in your api file.

若果要通过认证,该怎么传参数

Jerry-yz avatar Feb 01 '23 06:02 Jerry-yz

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Don't add Auth in your api file.

If you want to pass the authentication, how to pass parameters

Issues-translate-bot avatar Feb 01 '23 06:02 Issues-translate-bot

https://go-zero.dev/docs/advance/jwt/ or https://go-zero.dev/cn/docs/advance/jwt/

kevwan avatar Feb 11 '23 06:02 kevwan

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Feb 12 '24 01:02 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar May 18 '24 01:05 github-actions[bot]