# 'https' missing from OAUTH2 callback URL

**URL:** <https://community.n8n.io/t/https-missing-from-oauth2-callback-url/27495>\
**Category:** Questions\
**Tags:** deployment, oauth2\
**Created:** [June 27, 2023, 2:42am UTC](https://community.n8n.io/t/https-missing-from-oauth2-callback-url/27495 "2023-06-27T02:42:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbowler](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mbowler/32/10618_2.png) [@mbowler](https://community.n8n.io/u/mbowler)\
**Post date:** [June 27, 2023, 2:42am UTC](https://community.n8n.io/t/https-missing-from-oauth2-callback-url/27495/1 "2023-06-27T02:42:35Z")

</div>

## Describe the problem/error/question

While this hasn’t been a problem in the past with other credentials that require it, I now have one that fails without the https prepended to the callback URL. Is there a way to get the callback URL that is passed with the initial authorization to include “https”?

I have N8N\_PROTOCOL set to https and it is also included in the WEBHOOK\_URL variable.

## Information on your n8n setup

- **n8n version:** 0.221.2
- **Database (default: SQLite):** Postgres
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):** queue mode
- **Running n8n via (Docker, npm, n8n cloud, desktop app):** Docker
- **Operating system:** unknown linux distro

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [June 27, 2023, 8:34am UTC](https://community.n8n.io/t/https-missing-from-oauth2-callback-url/27495/2 "2023-06-27T08:34:04Z")

</div>

Hey @mbowler,

The protocol is added to the oauth callback URL from the `WEBHOOK_URL` it sounds like maybe it isn’t set properly or wasn’t stopped then started after making the change.

Can you double check the `WEBHOOK_URL` option and confirm it includes the protocol, If it is set can you share your full configuration with anything sensitive removed so we can test.

---

<div class="post-metadata">

**Author:** ![mbowler](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mbowler/32/10618_2.png) [@mbowler](https://community.n8n.io/u/mbowler)\
**Post date:** [July 14, 2023, 5:03pm UTC](https://community.n8n.io/t/https-missing-from-oauth2-callback-url/27495/3 "2023-07-14T17:03:50Z")

</div>

Hey Jon. Sorry for the huge delay. Got pulled into some other projects. Consequently, I have discovered that this is also affection auth with Google Cloud Projects.

**Here is the config for my main instance**

```auto
version: '3'
services:
  n8n:
    # image: n8nio/n8n:${SOFTWARE_VERSION_TAG}
    build:
      context: .
    restart: always
    environment:
      N8N_BASIC_AUTH_ACTIVE: 'false'
      N8N_AUTH_EXCLUDE_ENDPOINTS: api:webhook:webhook-test
      N8N_HOST: my.hostname.com (redacted, but in this same format)
      N8N_PROTOCOL: https
      N8N_PORT: 5678
      N8N_EDITOR_BASE_URL: my.hostname.com (redacted, but in this same format)
      N8N_EMAIL_MODE: 'smtp'
      N8N_SMTP_HOST: '172.17.0.1'
      N8N_SMTP_PORT: '25'
      N8N_SMTP_USER: ' '
      N8N_SMTP_PASS: ' '
      N8N_SMTP_SENDER: 'my.hostname.com@vm.elestio.app'
      N8N_SMTP_SSL: 'false'
      WEBHOOK_URL: https://my.hostname.com (redacted, but in this same format)
      NODE_FUNCTION_ALLOW_EXTERNAL: '*'
      NODE_FUNCTION_ALLOW_BUILTIN: '*'
      DB_TYPE: postgresdb
      DB_POSTGRESDB_DATABASE: n8n
      DB_POSTGRESDB_HOST: postgres
      #DB_POSTGRESDB_PORT: 34523
      DB_POSTGRESDB_USER: postgres
      DB_POSTGRESDB_PASSWORD: ${DB_PASSWORD}
      EXECUTIONS_MODE: queue
      QUEUE_BULL_REDIS_HOST: ${REDIS_HOST}
      QUEUE_BULL_REDIS_PORT: 23647
      QUEUE_BULL_REDIS_PASSWORD: ${REDIS_PASSWORD}
      N8N_LOG_LEVEL: debug
    dns: 
        - 8.8.8.8
    ports:
      - 172.17.0.1:5678:5678
    volumes:
      - ./.n8n:/home/node/.n8n
      - ./n8n-backups:/data/backups
      - /local-files:/home/node/files
    depends_on:
     postgres: 
      condition: service_healthy
      
  postgres:
    image: postgres:${POSTGRES_VERSION_TAG}
    shm_size: 1g
    container_name: postgres
    restart: always
    command: -c ssl=on -c ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem -c ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
    environment:
      POSTGRES_DB: postgres
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      PGDATA: /var/lib/postgresql/data
      TS_TUNE_MAX_CONNS: 100
    volumes:
      - /opt/app/data:/var/lib/postgresql/data
    ports:
      - '34523:5432'
    healthcheck:
      test: ['CMD-SHELL', 'pg_isready -h localhost -U postgres -d postgres']
      interval: 5s
      timeout: 5s
      retries: 10
      
  pgadmin4:
    image: dpage/pgadmin4:latest
    container_name: pgadmin4
    restart: always
    environment:
      PGADMIN_DEFAULT_EMAIL: my_email@example.com
      PGADMIN_DEFAULT_PASSWORD: ${DB_PASSWORD}
      PGADMIN_LISTEN_PORT: 443
      PGADMIN_ENABLE_TLS: 1  
    ports:
      - "34343:443"
    volumes:
      - /opt/app/pgadmin/servers.json:/pgadmin4/servers.json
      - /opt/app/pgadmin/storage/matt_practiceamigo.com/pgpass:/pgadmin4/pgpass
      - /root/.acme.sh/vm.elestio.app/fullchain.cer:/certs/server.cert
      - /root/.acme.sh/vm.elestio.app/vm.elestio.app.key:/certs/server.key

```

**This is the configuration of the workers**

```auto
version: "3"
services:
  n8n:
    #image: n8nio/n8n:${SOFTWARE_VERSION_TAG}
    build:
      context: .
    restart: always
    command: /bin/sh -c "sleep 5; n8n worker"
    environment:
      NODE_FUNCTION_ALLOW_EXTERNAL: "*"
      NODE_FUNCTION_ALLOW_BUILTIN: "*"
      DB_TYPE: postgresdb
      DB_POSTGRESDB_DATABASE: n8n
      DB_POSTGRESDB_HOST: ${POSTGRES_HOST}
      DB_POSTGRESDB_PORT: 34523
      DB_POSTGRESDB_USER: postgres
      DB_POSTGRESDB_PASSWORD: ${POSTGRES_PASSWORD}
      EXECUTIONS_MODE: queue
      QUEUE_BULL_REDIS_HOST: ${REDIS_HOST}
      QUEUE_BULL_REDIS_PORT: 23647
      QUEUE_BULL_REDIS_PASSWORD: ${REDIS_PASSWORD}
      N8N_ENCRYPTION_KEY: ${N8N_ENCRYPTION_KEY}
      N8N_LOG_LEVEL: debug
      WEBHOOK_URL: https://my.hostname.com (redacted, but in same format)

```

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [July 14, 2023, 5:10pm UTC](https://community.n8n.io/t/https-missing-from-oauth2-callback-url/27495/4 "2023-07-14T17:10:13Z")

</div>

Hey @mbowler,

That setup looks like what I have in mine apart from the `N8N_EDITOR_BASE_URL`, We should be picking up the value from the `WEBHOOK_URL` option so it still feels like that option is not set correctly or maybe isn’t being picked up unless `N8N_EDITOR_BASE_URL` is overwriting it, Have you tried adding https:// to the start of that as well?

---

<div class="post-metadata">

**Author:** ![mbowler](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mbowler/32/10618_2.png) [@mbowler](https://community.n8n.io/u/mbowler)\
**Post date:** [July 14, 2023, 5:16pm UTC](https://community.n8n.io/t/https-missing-from-oauth2-callback-url/27495/5 "2023-07-14T17:16:08Z")

</div>

Bingo! Looks like that did it. Not sure why I didn’t try that. Hindsight 20/20 and all…

Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [July 21, 2023, 5:16pm UTC](https://community.n8n.io/t/https-missing-from-oauth2-callback-url/27495/6 "2023-07-21T17:16:15Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
