13

Restricted the app to login using OAuth to one domain (say abc.com). Getting the error with the following steps:

  1. Logged in with multiple accounts in a browser on google.
  2. On trying to login with a user whose domain is not mentioned, nothing happens(no error message). Try to login with the invalid user twice.
  3. Now try to login with a valid user.

On doing that the following error occurs:

OAuth 2 parameters can only have a single value: hd

In the error stack trace client id is visible. Is that a security risk?

How can this error be fixed?

PaulG
  • 13,871
  • 9
  • 56
  • 78
user2290352
  • 139
  • 3

1 Answers1

1

According to documentation the hd parameter is for G Suite, so you are probably repeating the hd parameter, one with the hd=* and the other with your hosted domain(s). Also states that you should not rely in this UI optimization to control access to your app.

In the error stack trace client id is visible. Is that a security risk?

None. It is not a secret. It is use for debugging purpose.

How can this error be fixed?

Try to replace the param hd instead of just add a new one. In general, this should be done with every param of your request. Also the OAuth2 documentation states an invalid_request error when you repeat a parameter.

Community
  • 1
  • 1
Antonio Saco
  • 1,620
  • 12
  • 21