electron-oauth-helper
electron-oauth-helper copied to clipboard
Uncaught Error: client_id is required for code
I'm using Firebase and I'm getting this error. How do I fix it?
Thanks to your question!
client_id is required parameter. Did you configure this?
https://github.com/mironal/electron-oauth-helper/blob/master/example/src/main/config.example.js may help to you.
I configured it like the example shows by just pasting in the firebase config.--Sent from Yandex.Mail for mobile01.11.2018, 16:09, "mironal" [email protected]:Thanks to your question! client_id is required parameter. Did you configure this? https://github.com/mironal/electron-oauth-helper/blob/master/example/src/main/config.example.js may help to you.
—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.
Which OAuth Provider are you using?
The second one
Do you set response_type parameter ?
and, Is there a similar error even if I run it in the example program? (Do not forget to rename config.example.js to config.js)
No and there is a similar error in the example.
Hmm. I tried Google's OAuth2 using example code, but no error client_id is required for code occurred.
You need to set "response_type" like the following code.
const GoogleClientWebApp = {
client_id: "your client id", // <- rewrite your client id
client_secret: "your client secret", // <- rewrite your client secret
redirect_uri: "your redirect uri", // <- rewrite your redirect uri
authorize_url: "https://accounts.google.com/o/oauth2/v2/auth",
response_type: "token", // <- Do not forget this.
scope: "https://www.googleapis.com/auth/userinfo.profile",
}
I’m not using GoogleClientWebApp because I saw it not being used with firebase in config.example.js.