/authorize endpoint gives 'looks like something went wrong' error

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):
    response_type:‘code’,
    client_id: ‘myClientId’,
    connection: ‘google-oauth2’,
    state: ‘something’,
    redirect_uri: ‘https://someurl.ngrok.io/

  • 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?

–edit–
Never mind about getting the status 200 from the authorize endpoint, the library I used (request.js) automatically follows redirects.

Hi john-batch,

Did you check the logs here: https://manage.auth0.com/#/logs
They usually have more info.

John

Thanks for your reply. The logs didn’t mention a error. It turns out my webhook wasn’t returning a response, which triggered the generic error page.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.