[GH-ISSUE #116] Cannot get this to work. #429

Closed
opened 2026-04-13 14:07:47 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @Arrmm on GitHub (Oct 14, 2025).
Original GitHub issue: https://github.com/RayLabsHQ/gitea-mirror/issues/116

I followed the exact steps below.

# Clone repository
git clone https://github.com/RayLabsHQ/gitea-mirror.git
cd gitea-mirror

# Start with simplified setup
docker compose -f docker-compose.alt.yml up -d

I even followed the guide in docker-compose.alt.yml and I even created .env and set the BETTER_AUTH_SECRET.

Docker compose worked fine, pull down the container, launched it, and I managed to create a new account and able to log in.

However, when I use another browser to log in, it says "Invalid origin". Obviously I know the email and password since I just created the account.

Image

And then what's more interesting is that on the browser that I originally created the account, I can't sign out from clicking the top right button and select Logout. Nothing happens. I remain logged in.

As the result I cannot proceed to set up github and gitea since I cannot reliably log in and out of gitea-mirror. Can someone point out what I did wrong?

Originally created by @Arrmm on GitHub (Oct 14, 2025). Original GitHub issue: https://github.com/RayLabsHQ/gitea-mirror/issues/116 I followed the exact steps below. ``` # Clone repository git clone https://github.com/RayLabsHQ/gitea-mirror.git cd gitea-mirror # Start with simplified setup docker compose -f docker-compose.alt.yml up -d ``` I even followed the guide in `docker-compose.alt.yml` and I even created `.env` and set the `BETTER_AUTH_SECRET`. Docker compose worked fine, pull down the container, launched it, and I managed to create a new account and able to log in. However, when I use another browser to log in, it says "Invalid origin". Obviously I know the email and password since I just created the account. <img width="366" height="85" alt="Image" src="https://github.com/user-attachments/assets/0de09890-29ab-4645-b4f5-08d64fa68938" /> And then what's more interesting is that on the browser that I originally created the account, I can't sign out from clicking the top right button and select Logout. Nothing happens. I remain logged in. As the result I cannot proceed to set up github and gitea since I cannot reliably log in and out of gitea-mirror. Can someone point out what I did wrong?
Author
Owner

@Arrmm commented on GitHub (Oct 14, 2025):

Looks like i figured it out. I ended up referring to #63 and added both BETTER_AUTH_URL and BETTER_AUTH_TRUSTED_ORIGINS to .env, and that fixed the problem.

<!-- gh-comment-id:3403375625 --> @Arrmm commented on GitHub (Oct 14, 2025): Looks like i figured it out. I ended up referring to #63 and added both `BETTER_AUTH_URL` and `BETTER_AUTH_TRUSTED_ORIGINS` to `.env`, and that fixed the problem.
Author
Owner

@arunavo4 commented on GitHub (Oct 15, 2025):

Yea I will update the readme and the docker compose to add these vars

<!-- gh-comment-id:3404183096 --> @arunavo4 commented on GitHub (Oct 15, 2025): Yea I will update the readme and the docker compose to add these vars
Author
Owner

@arunavo4 commented on GitHub (Oct 22, 2025):

I have updated the docker-compose.alt.yml to better solve this

<!-- gh-comment-id:3430426153 --> @arunavo4 commented on GitHub (Oct 22, 2025): I have updated the `docker-compose.alt.yml` to better solve this
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea-mirror#429