Cashbook4.0+ 报错:valid callback URL. Received
## 简介 部署 `4.0+` 的 dingdangdog/cashbook 后,访问前端页面报50
渲染中...
## 简介
部署 `4.0+` 的 dingdangdog/cashbook 后,访问前端页面报500,容器日志报错:`INVALID_CALLBACK_URL_ERROR`,这个错误大概率是缓存问题(授权框架的锅,目前从代码上还没找到根治方案),后面有个人解决方案。
最新文档请前往文章站:https://doc.cashbook.oldmoon.top/
### 报错信息大致如下
```console
[next-auth][error][INVALID_CALLBACK_URL_ERROR]https://next-auth.js.org/errors#invalid_callback_url_elInvalid callback URL. Received: http://localhost:12345http://localhost:9090/calendarvalid callback URL. Received: http://localhost:12345http://localhost:9090/calendar InvalidcallbackUrl: In?
at assertConfig(/app/server/node_modules/next-auth/core/lib/assert.js:62:12)at AuthHandler(/app/server/node_modules/next-auth,core/index.js:70:52)
/process/task_queues:95:5)at process.processTicksAndRejections(node:interna.nitro/nitro.mjs:5871:24)at async 0bject.handler(file:///app/server/chunksat async 0bject.handler(file:///app/server/chunksnitro/nitro.mjs:3124:19)at async Server.toNodeHandle(file:///app/server/chunks/nitro/nitro.mis:3395:7){code:'INVALID_CALLBACK URL ERROR
```
<!-- more -->
### 解决方案
如果你确认环境变量配置没有问题,请尝试清理缓存!方法如下:
1. 打开你的 `Cashbook网站`;
2. 按 `F12` 打开浏览器控制台;
3. 找到如下页面 `Application` 选项卡中的 `Storage` 页面,点击 `Clean site data`;
4. 完成上述步骤后,刷新网站,该问题一般就能解决;
5. 如果还没解决,请再次检查配置或前往开源仓库提问!

END
评论
登录后查看和发表评论
前往登录