Restricted the app to login using OAuth to one domain (say abc.com). Getting the error with the following steps:
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?
How Does OAuth 2.0 Work? At the most basic level, before OAuth 2.0 can be used, the Client must acquire its own credentials, a client id and client secret, from the Authorization Server in order to identify and authenticate itself when requesting an Access Token.
OAuth 2.0 is a secure, open data sharing standard that should be built into every app. This authentication and authorization standard protects user data by providing access to the data without revealing the user's identity or credentials.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With