I have an app which can authorize user through Google provider, and we have api endpoint, to the address of which you need to make a GET request. API answers with 307 code and redirect url, but instead of a redirect, I get a request from the current page:
When i tried to google similar problem, all the answers be like: 'just handle redirect in response', but app call redirect url as GET request from current page immediately, so i can't read response and had error.
I want to achieve the following flow:
- User makes a get request to our api
- Upon receiving a 307 code, we get just get redirect url, and manualy redirect user from the current page to the page from the response.
I tried to achieve this with Fetch API and Axios