Google OAuth 2.0 returning redirect_uri error #5211

Closed
opened 2026-02-05 09:48:49 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @DoctorRetromaker on GitHub (Mar 7, 2025).

Describe the Bug

After setup Google OAuth 2.0 mechanism, Google replies with a Error 400: redirect_uri_mismatch

Going to error details, the problem seems to be a double slash after the domain name.

Steps to Reproduce

  1. If no one is reporting this error, should be my failure
  2. After reviewing instructions and setup, can't find where I', could be failing

Expected Behaviour

User logged in

Screenshots or Additional Context

Image

Image

Browser Details

Brave v1.76.73 (Mar 5, 2025)

Exact BookStack Version

BookStack v25.02

Originally created by @DoctorRetromaker on GitHub (Mar 7, 2025). ### Describe the Bug After setup Google OAuth 2.0 mechanism, Google replies with a `Error 400: redirect_uri_mismatch` Going to error details, the problem seems to be a double slash after the domain name. ### Steps to Reproduce 1. If no one is reporting this error, should be my failure 2. After reviewing instructions and setup, can't find where I', could be failing ### Expected Behaviour User logged in ### Screenshots or Additional Context ![Image](https://github.com/user-attachments/assets/ccfe648d-d183-4de5-82f2-b85a809f7973) ![Image](https://github.com/user-attachments/assets/a66f9987-f33d-40ed-ab20-104d1ff87c08) ### Browser Details Brave v1.76.73 (Mar 5, 2025) ### Exact BookStack Version BookStack v25.02
OVERLORD added the 🐕 Support label 2026-02-05 09:48:49 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Mar 7, 2025):

Hi @DoctorRetromaker,
Can you check your APP_URL you have set in your .env file (or docker compose stack or similar) and ensure it does not end with a slash.

@ssddanbrown commented on GitHub (Mar 7, 2025): Hi @DoctorRetromaker, Can you check your `APP_URL` you have set in your `.env` file (or docker compose stack or similar) and ensure it does not end with a slash.
Author
Owner

@DoctorRetromaker commented on GitHub (Mar 8, 2025):

Rechecked ...

The APP_URI var in the docker setup was erroneously set with a ending slash... so, vars priority is higher then .env setting, isn't?

@DoctorRetromaker commented on GitHub (Mar 8, 2025): Rechecked ... The APP_URI `var` in the docker setup was erroneously set with a ending slash... so, vars priority is higher then `.env` setting, isn't?
Author
Owner

@ssddanbrown commented on GitHub (Mar 8, 2025):

Yeah, environment vars (like those set via docker) will take precedence over .env file vars.

@ssddanbrown commented on GitHub (Mar 8, 2025): Yeah, environment vars (like those set via docker) will take precedence over `.env` file vars.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5211