Add Gitea Account
cduchenoy opened this issue · 3 comments
Hi,
Thank you so much for this wonderful work on the recovery of stackedit :)
We failed to create a workspace from gitea.
We tried with gitea versions 1.18.3 and 1.19.0
We are redirected to the gitea but after authorizing the stackedit apps nothing happens (:
In the account part we have this: "StackEdit+ has no access to any external account yet."
StackEdit Compose
# https://github.com/mafgwo/stackedit-plus
version: "3.7"
services:
stackedit:
image: mafgwo/stackedit-plus:6.0.0-2
environment:
- LISTENING_PORT=8080
- ROOT_URL=/
# redirect url https://<url>/oauth2/callback
- GITEA_URL=https://gitea.[url]
- GITEA_CLIENT_ID=XXX-XXXX-XXX...
- GITEA_CLIENT_SECRET=<long_secret>
ports:
- 10889:8080/tcp
Gitea Config:
- Apps name: StackEdit+
- Redirect URL: https://stackedit.[url]/oauth2/callback
Could you help us to solve this problem
/Cyril
Make sure you have setup core
correct in gitea.
First, your Gitea instance needs to support cross-origin requests (CORS). The CORS configuration on Gitea's official website may have some issues. If this is the case, you can use an Nginx proxy to support CORS. Second, if your Gitea instance is using HTTP instead of HTTPS, you need to add it via http://stackedit.net/app, otherwise it will not be added successfully.
add_header Access-Control-Allow-Headers *;
add_header Access-Control-Allow-Origin $http_origin;
add_header Access-Control-Allow-Methods GET,POST,PUT,DELETE,OPTIONS;
if ($request_method = 'OPTIONS') {
return 204;
}
Hi,
Txu !!! it's works 👍