Google OAuth Redirect Site not Working Correctly for GoCD

16 views
Skip to first unread message

Zachary Callahan

unread,
Jan 7, 2020, 11:04:54 AM1/7/20
to go-cd
We currently have our GoCD original system, and a clone of our GoCD original system. However, when I am trying to set up Google OAuth on the clone system, the redirect for Google OAuth appears to only be going to the link for the original system. I've set up the Google OAuth according to this: https://github.com/gocd-contrib/google-oauth-authorization-plugin/blob/master/INSTALL.md.

Our original system is set up a url of dev.site.com with the clone system being dev-clone.site.com. I have set up Google OAuth in the clone system, but whenever I try to use Google OAuth to sign in, I get redirected back to the dev.site.com instead of dev-clone.site.com. Is there any place in the config files where I can adjust where the Google OAuth is redirecting to? Or has anyone run into anything similar before?

Ashwanth Kumar

unread,
Jan 7, 2020, 11:13:47 PM1/7/20
to go...@googlegroups.com
Just to make sure this isn't a copy-paste error while cloning, please check the following
- Client ID and Client Secret used for Google API
- Authorised Redirect URIs in Google API Console

According to the Plugin API (https://plugin-api.gocd.org/current/authorization/#authorization-server-url), the redirect URL is given by the server and not configured by the plugin. You can also validate that from here and here. After verifying the client keys and URI in Google API Console, Unless the server itself thinks that it is dev.site.com and not dev-clone.site.com, this shouldn't be happening. 

On Tue, Jan 7, 2020 at 9:34 PM Zachary Callahan <zcal...@vertify.com> wrote:
We currently have our GoCD original system, and a clone of our GoCD original system. However, when I am trying to set up Google OAuth on the clone system, the redirect for Google OAuth appears to only be going to the link for the original system. I've set up the Google OAuth according to this: https://github.com/gocd-contrib/google-oauth-authorization-plugin/blob/master/INSTALL.md.

Our original system is set up a url of dev.site.com with the clone system being dev-clone.site.com. I have set up Google OAuth in the clone system, but whenever I try to use Google OAuth to sign in, I get redirected back to the dev.site.com instead of dev-clone.site.com. Is there any place in the config files where I can adjust where the Google OAuth is redirecting to? Or has anyone run into anything similar before?

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/d0c2069e-0bfc-4ac6-a7c1-dd97911adfdd%40googlegroups.com.


--

Ashwanth Kumar / ashwanthkumar.in

Reply all
Reply to author
Forward
0 new messages