Help ! Local Source Code Start 401 (UNAUTHORIZED) #29261
Replies: 2 comments 2 replies
-
|
Hi @ljy19920616! I'm Dosu and I’m helping the dify team. For local development, set your These values ensure the frontend (on port 3000) and backend/API (on port 5001) can communicate and exchange authentication tokens without CORS issues. The Make sure you also:
If you still get 401 errors, check that your browser allows cookies for If you’re using OAuth login, make sure the redirect URIs in your provider settings match your Let me know if you’re still stuck after these steps! To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
|
Generate a |
Beta Was this translation helpful? Give feedback.





Uh oh!
There was an error while loading. Please reload this page.
-
Self Checks
1. Is this request related to a challenge you're experiencing? Tell me about your story.
I followed the documentation to complete the Local Source Code Start deployment, but during login, the console continuously outputs the following errors:

GET http://localhost:5001/console/api/account/profile 401 (UNAUTHORIZED)POST http://localhost:5001/console/api/refresh-token 401 (UNAUTHORIZED)
I'm not sure which configurations need to be modified to successfully log in.
I have checked some resources, and some mention that I need to modify the following configurations in /dify/api/.env:
WEB_API_CORS_ALLOW_ORIGINS=*
CONSOLE_CORS_ALLOW_ORIGINS=*
CONSOLE_API_URL=http://localhost:5001/console/api
CONSOLE_WEB_URL=http://localhost:3000
SERVICE_API_URL=http://localhost:5001/api
APP_WEB_URL=http://localhost:3000
What values should these configurations be set to?
2. Additional context or comments
No response
Beta Was this translation helpful? Give feedback.
All reactions