React to FastAPI Oauth2 Callback
jhirvine
TRIALOP

a year ago

Hi,

I have an application using google oauth2 to authenticate users, and I set the callback to a fastapi server so I can store the token for later use. I am trying to use railway internal networking to send this callback request from my react app to the fastapi backend, but I am getting errors that the POST request is timing out.

I'm using the generated internal domain name and port (8080) in my request. I can see that the backend is up and listening on IPv4 and IPv6 on 8080. However, since this is a callback URL, it will need to be an SSL endpoint.

First, am I missing something simple to get underlying connectivity up between these services? And second, is it possible to have the backend api behind HTTPS on the internal network segment?

Solved

3 Replies

brody
EMPLOYEE

a year ago

Hello,

The callback URL needs to be that of the public domain for the API.

A user's browser does not have access to the private network, wouldn't be a very private network is they did haha.

See our docs for more information on this topic -

https://docs.railway.com/guides/private-networking#private-network-context

Hope this helps!

Brody


Status changed to Awaiting User Response Railway about 1 year ago


jhirvine
TRIALOP

a year ago

facepalm emoji duh! Thank you for that.


Status changed to Awaiting Railway Response Railway about 1 year ago


brody
EMPLOYEE

a year ago

No problem!


Status changed to Awaiting User Response Railway about 1 year ago


Status changed to Solved brody about 1 year ago


Loading...