Pergunta

I am trying to implement google oauth 2.0 as authentication method for my django website.

For developing purpose, I was working on localhost, which is just fine.

Now my website need to be moved to production. However, we run our web in a private networking which need to be accessed via VPN.

So I wondering what kind of 'redirect_uri' I should provide for google api console as callback path?

Thanks in advance

Foi útil?

Solução

(Presumably your users have already logged in via the VPN?)

The redirect_uri should be the URL that your users will see in the address bar in their browser.

Google's servers don't connect to it directly, so (like "localhost") it's fine that it's not internet accessible, but the user will be redirected to this URI after a successful login/authorization, so they will need to be able to connect to this URL from their browser - presumably though they already started on this same site before being redirected to the Google login/authorization pages (which in turn redirect back once done).

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top