Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught Error: client_id is required for code #62

Open
RossComputerGuy opened this issue Oct 31, 2018 · 8 comments
Open

Uncaught Error: client_id is required for code #62

RossComputerGuy opened this issue Oct 31, 2018 · 8 comments

Comments

@RossComputerGuy
Copy link

I'm using Firebase and I'm getting this error. How do I fix it?

@mironal
Copy link
Owner

mironal commented Nov 1, 2018

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.

@RossComputerGuy
Copy link
Author

RossComputerGuy commented Nov 2, 2018 via email

@mironal
Copy link
Owner

mironal commented Nov 3, 2018

Which OAuth Provider are you using?

@RossComputerGuy
Copy link
Author

RossComputerGuy commented Nov 3, 2018 via email

@mironal
Copy link
Owner

mironal commented Nov 4, 2018

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)

@RossComputerGuy
Copy link
Author

RossComputerGuy commented Nov 4, 2018 via email

@mironal
Copy link
Owner

mironal commented Nov 4, 2018

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",
}

@RossComputerGuy
Copy link
Author

RossComputerGuy commented Nov 4, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants