-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GET /upload/files or any GET from content-types always returns 401. #20244
Comments
Hi @Luis-txd can you please describe more about it? Please share the details about bug? Can you please replace your key name from "token" --> "jwtToken" and store it in local storage. Just hit and try may be this will work. I am not hardcore coder but just try it please . |
What more information should i provide? That solution did not resolve the problem @shubham9069 . I should be able to access them even wittout tokens since they are publicly accessible. |
Hello @Luis-txd, We ask that you please follow the issue template. Please update the issue with the template and we can reopen this report. Thank you. |
Hello @Luis-txd, I see you are wanting to ask a question that is not really a bug report,
Please see the following contributing guidelines for asking a question here. Thank you. |
Description I have configured the routes for a plugin in Strapi, but some routes return a 401 error when called. Below is the specific route configuration and error log. Error Log [2024-06-07 20:45:16.824] http: POST /wechat-auth/phone (13 ms) 401 yaml Route Configuration export default [
{
method: 'POST',
path: '/login',
handler: 'wechatController.login',
config: {
auth: false,
policies: [],
},
},
{
method: 'POST',
path: '/phone',
handler: 'wechatController.getUserPhoneNumber',
config: {
policies: [],
},
},
]; Strapi Version: v4.24.4 |
Bug report
Required System information
Describe the bug
I am developing my own plugin and i need access to the admin content-types and the files in the Media Library.
While using the useFetchClient, and properly setting the authorization token as the one in the local storage, any request to the content types or the media library return 401 (Unauthorized).
This issue happens even when the find and findOne are allowed for public access (and through the browser, i am able to acess that data).
Code snippets
Thanks in advance for the help
The text was updated successfully, but these errors were encountered: