Issues with auth/external/callback for Google OAuth

Hello! I’ve been trying to setup the google calendar integration but am having problems when trying to Link Account from Link to OAuth2 Authorize Callback – My Home Assistant

I’m running on a docker container and haven’t made much changes from the default configuration noted in the installation. I have the redirect URI in Google set as Link to OAuth2 Authorize Callback – My Home Assistant and it opens My Home Assistant after the authentication via Google. I’m not sure what instance URL I should be using and tried several and got the corresponding errors after clicking Link Account

I’ve tried deleting the app credential / secret and creating a new one but no luck either. Would love any suggestions or insights!

Ate you having network problems? DNS? VLAN?
Describe your situation and setup a little more.

I don’t think I have network problems. I primarily access my instance on my mini PC (linux) via localhost. I am also able to access my instance on other devices on my network via the static IP address. I don’t have a DNS or VLAN set up. For the setup, I am running it through a container via Docker Compose with this config:

homeassistant:
    container_name: homeassistant
    image: "ghcr.io/home-assistant/home-assistant:stable"
    volumes:
      - /home-assistant:/config
      - /etc/localtime:/etc/localtime:ro
      - /run/dbus:/run/dbus:ro
    restart: unless-stopped
    privileged: true
    network_mode: host
    ports:
    - "8123:8123"  # Home Assistant web UI

The only changes I tried to make for the HA config is for logging.

# Loads default set of integrations. Do not remove.
default_config:

logger:
  logs:
    homeassistant.components.google: debug
    homeassistant.helpers.config_entry_oauth2_flow: debug

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

I was able to setup other integrations - MQTT, Frigate (via HACS), and Alexa. I believe that’s all I’ve done in terms of setup so far. Let me know if there’s something specific!