'The redirect URI included is not valid.' error OAuth'ng a secondary

Summary

For a Geo setup, when adding a secondary, if the original URL is entered incorrectly (e.g https://ee-secondary1x.local) but then corrected (e.g. https://ee-secondary1.local), the OAuth URL that is generated is incorrect and results in a The redirect URI included is not valid. error.

Steps to reproduce

https://www.evernote.com/shard/s54/sh/8c5f3e5c-717e-410b-8591-5cc7d8b8656c/dea69c71fd8c3227/res/e24b5c65-75a5-478a-b807-2b54908643ec/screencast%202018-09-12%2011-17-31.mp4

Example Project

Need local GDK with Geo setup.

What is the current bug behavior?

The OAuth authorise prompt does not appear and The redirect URI included is not valid. error occurs. This results in no OAuth trust between the Primary and the secondary.

What is the expected correct behavior?

The OAuth authorise prompt 👇 appears.

User_Settings___GitLab_2018-09-12_11-27-48

Edited by 🤖 GitLab Bot 🤖