0

I want to connect to the Facebook API to authenticate users from my django rest app. I have got everything working locally but am running into trouble deploying. I first tried to deploy both the react front end and django backend to App Engine as two different services, however I could not get the frontend to talk to the backend. My proposed solution was to try and host the backend in compute engine. This works, but the FB API requires an ipv6 address but GCP only supports ipv4. I was reading that I could create a global load balancer and assign a static ipv6 address to that however I am not finding an example I can understand or follow. Is it even possible to do what I am thinking or does the load balancer only work on incoming traffic? Will the FB api still not recognize the ipv6 address? Is there a better proposed way to do this? I am afraid I will still run into this issue if I got the backend working in app engine. Any thoughts?

Thank you, Zach

new name
  • 15,861
  • 19
  • 68
  • 114
Zach
  • 113
  • 1
  • 9
  • Can you show the link or other document that says the FB API requires an IP V6 address? – Kolban Jun 07 '20 at 18:43
  • @Kolban while I dont have a specific link, I tried to whitelist my local ipv4 address and the FB api kept giving an error that was not whitelisted. I tried this both locally and on compute engine. On compute engine, when I whitelisted the ipv4 address the error message was actually that was not on the whitelisted list.. even though it was. This has led me to believe only ipv6 addresses work. When I use my local ipv6 address everything works fine. – Zach Jun 07 '20 at 20:15
  • Also, there are plenty of links that talk about FB converting from ipv4 to ipv6 infrastructure.. although their docs never specify an ipv6 is necessary and the fb dev console lets you whitelist ipv4 addresses. – Zach Jun 07 '20 at 20:16
  • Could you please update your question with the error message you are getting? I understand you are currently using the backend on GCE and the frontend on GAE and this setup works, but you are still not able to connect to the FB API. If you can also share a code snippet of what you have so far, it would help other understand your issue. – pessolato Jun 09 '20 at 07:26

0 Answers0