Setting up Google Apps Connection

I’m trying to set up Google Apps connection by following this guide https://auth0.com/docs/connections/social/google.

After setting up the connection, I clicked on the Try button where it redirects to Google for Authentication. After authentication, I’ve always get this error:

If you are seeing this, it means that your connection didn't work. 
These are the details:
          
{
  "error": "unauthorized",
  "error_description": "Access denied"
}

I’ve enabled Google+ API, Admin SDK and has allowed a few clients to use the connection and still get the error. Any idea why?

Make sure that you correctly copy/paste both the client identifier and secret (for example, check for additional spaces at the start or end). Given that you’re redirected to Google I believe the client identifier should be okay, but the error in question could still be explained by an incorrect client secret.

@jmangelo It’s definitely the client secret. When I try to add a space at the beginning or end of the client secret, the error changes to:

{
  "error": "invalid_request"
}

I’ve checked that the client secret is the same. But, no luck. Is there any place else that I should check?

@jmangelo It’s definitely the client secret. When I try to add a space at the beginning or end of the client secret, the error changes to { "error": "invalid_request" }. I’ve checked that the client secret is the same. But, no luck. Is there any place else that I should check?

Given that you also suspect that it can be related to the secret, my suggestion would be to repeat the whole process; I understand this is not ideal, but can you try this?

I’ve tried to repeat the whole process and it still doesn’t work; still with the same error. Where else should I look?

I’ve got two auth0 accounts; one for development and the new one for production. It was fine setting up Google Apps in dev. It’s just the new account that poses problem. I event tried creating a new OAuth client using my dev account, and still get the same error when I try it my Auth0 production account.

I’ve tried to repeat the whole process and it still doesn’t work; still with the same error. Where else should I look?

I’ve got two auth0 accounts; one for development and the new one for production. It was fine setting up Google Apps in dev. It’s just the new account that poses problem. I event tried creating a new OAuth client using my dev account, and still get the same error when I try it my Auth0 production account.

The underlying issue that caused this error ended up being an existing rule that failed the authentication process and resulted in the access denied situation. As general information for anyone that might come across errors than only reproduce in certain accounts it’s a good suggestion to check any existing rules.

2 Likes