So our frontend is React and Backend is Django and we want to use Discourse as a discussion platform for our application. The problem is whenever our backend API returns the redirected URL, it return login timeout even though the entire process takes hardly a second to complete.
The methodology is as follows:
- The frontend makes an API call to the backend when it is triggered for opening the discussion forum.
- The backend then makes a request to Discourse which is redirected to the
discourse_connect_url
along with the payload and signature. - The authentication happens.
- The
return_url
is then sent back to the first API call which made the request, which then sends it back to the frontend as JSON response.
On trying to access the URL it gives session timeout. Even if I just try to access the URL as soon as it is created it just gives login timeout error. Is the approach bad? What is going wrong?