How to add host.docker.internal to Authorized redirect URIs for google OAuth Api

275 Views Asked by At

I have a microservice running in a docker container which connects to outside on

host.docker.internal

these are /etc/hosts file in the container

192.168.65.2 host.docker.internal

How can I add http://host.docker.internal:3006/callback to Authorized redirect URIs in google OAuth API?

1

There are 1 best solutions below

0
Tore Nestenius On

You need to use a public routable DNS entry, for Google OAuth to be able to redirect the user back to you after authentication. You can't use host.docker.internal.