Hi, I’m trying to perform a social login on google with the /authorize endpoint.
When I use the ‘try’ function in the connections/social tab, I get a ‘connection successful’ message. I’ve defined the callback url in the app and the app is authorized to use the google connection. My app is a ‘machine to machine’ kind.
I use a ngrok url as callback url to test it locally.
My setup is a SPA with a API as backend.
The steps are:
From the api I call the /authorize endpoint using a get request with the following parameters (url encoded):
A response is sent back with a status of 200 and some html
the html is sent back by the backend and in the frontend I redirect with window.location.href=‘http://backend_url/some_action’
Fill in google credentials and give permission to the app, after successfully authentication with google I get the following screen:
Things I already tried
testing on the staging environment instead of locally with ngrok. Getting the same error message.
using the response_mode parameter to get back a different response from the /authorize endpoint (without success, also see this topic for more information)
not using url encoding
own keys and auth0’s dev keys for the google social connection
So I think it’s strange that I don’t get a 302 returned by the /authorize endpoint, though getting html back and rendering it is still workable. More pressing is, how can I resolve the error that I’m getting?
Never mind about getting the status 200 from the authorize endpoint, the library I used (request.js) automatically follows redirects.