{"id":19725400,"url":"https://github.com/easychen/weanswer","last_synced_at":"2025-04-29T23:30:41.956Z","repository":{"id":261397686,"uuid":"881769074","full_name":"easychen/WeAnswer","owner":"easychen","description":"Apache Answer的微信登入整合方案，可以当做兔小巢txc.qq.com的开源替代。","archived":false,"fork":false,"pushed_at":"2024-11-06T10:07:54.000Z","size":374,"stargazers_count":42,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T20:11:15.355Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/easychen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-01T07:26:23.000Z","updated_at":"2025-03-13T06:48:40.000Z","dependencies_parsed_at":"2024-11-06T11:33:39.815Z","dependency_job_id":null,"html_url":"https://github.com/easychen/WeAnswer","commit_stats":null,"previous_names":["easychen/weanswer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easychen%2FWeAnswer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easychen%2FWeAnswer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easychen%2FWeAnswer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easychen%2FWeAnswer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/easychen","download_url":"https://codeload.github.com/easychen/WeAnswer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251599724,"owners_count":21615572,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T23:29:37.318Z","updated_at":"2025-04-29T23:30:40.095Z","avatar_url":"https://github.com/easychen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WeAnswer\n\n\u003e 兔小巢官方的导出功能不支持导出回复，所以我也写了一个[支持回复的导出工具](https://github.com/easychen/txc-exporter)\n\n腾讯兔小巢（txc.qq.com）收费了。一通比较以后，感觉Apache Answer是一个不错的开源替代。但是兔小巢两个很大的特点，一是用户可以直接通过微信登录。\n\n- 好消息：Apache Answer支持 OAuth2 登录\n- 坏消息：微信的 OAuth2 登录是他们魔改过的，不是标准流程。\n\n于是便有了这个项目，它以代理的形式，把微信那奇形怪状的 OAuth2 流程改成标准流程。这样 Answer 和其他所有支持 OAuth2 标准流程的应用都可以通过微信来登录了。\n\n## 如何使用\n\n因为和回调相关，因此我们需要拥有备案以后的域名。\n\n以下为测试方便\n\n1. 假设 OAuth2代理 运行在 o.ftqq.com:8080\n1. 假设 Answer 运行在 o.ftqq.com:9080\n\n请根据自己的实际情况进行替换。\n\n注意：只有公众号测试平台支持http和端口号，正式环境必须为https和80端口。\n\n### 创建 .env \n\n复制 `.env.example` 为 `.env`，根据实际情况填写以下环境变量\n\n```.env\nWECHAT_APPID=微信公众号的APPID\nWECHAT_APPSECRET=微信公众号的APP Secret\nREDIRECT_URI=http://o.ftqq.com:8080/callback\nSESSION_SECRET=随机密码\nCLIENT_REDIRECT_URI=http://o.ftqq.com:9080/answer/api/v1/connector/redirect/basic\nFAKE_EMAIL_DOMAIN=fake.mail.subdeer.com\n```\n### 启动OAuth代理\n\n```bash\nnode index.js\n```\n\n如果需要稳定服务，可以使用 pm2 \n\n```bash\nnpm install -g pm2\npm2 start index.js\n```\n\n### 配置通用连接器\n\n进入 Answser的后台管理，选择 `已安装插件`，点击`操作`，启用。\n\n![](image/20241101182635.png)\n\n启动后再次点击`操作`，\n\n![](image/20241101182840.png)\n\n进入设置。\n\n参考下图填写即可：\n\n![](image/20241101182938.png)\n\n保存后，关闭`后台`→`站点设置`→`登录`中的邮箱注册和密码登录\n\n![](image/20241101183240.png)\n\n登录页面和注册页面均可通过微信登录了。\n\n![](image/20241101183426.png)\n\n## Next\n\n兔小巢另一个特色，是可以通过微信通知用户，从而实现实时的反馈。这个就需要编写插件来实现了。Answer 采用 Go 实现，我不怎么会，欢迎PR。\n\n- 可以参考官方的钉钉插件 \u003chttps://github.com/apache/incubator-answer-plugins/tree/main/notification-dingtalk\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasychen%2Fweanswer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feasychen%2Fweanswer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasychen%2Fweanswer/lists"}