gridsome-starter-netlifycms icon indicating copy to clipboard operation
gridsome-starter-netlifycms copied to clipboard

Error on /admin

Open Berkmann18 opened this issue 5 years ago • 5 comments

Whenever I try to go to http://localhost:8080/admin and click on the link, it leads to this error: Error Authenticating with GitHub: You must set a site_id with netlify.configure({site_id: "your-site-id"}) to make authentication work from localhost.

Here's what I tried (all of which failed) in config.yml:

backend:
  name: github
  branch: master
  repo: Berkmann18/gridsome-starter-netlifycms
  site_id: compassionate-lalande-822e9b
backend:
  name: github
  branch: master
  repo: Berkmann18/gridsome-starter-netlifycms

site_id: compassionate-lalande-822e9b`

Berkmann18 avatar Mar 22 '19 17:03 Berkmann18

As mentioned in the docs of NetlifyCMS.

Note that these are properties of the backend field, and should be nested under that field.

image


Did you got different error in both the cases or the error was same.

mittalyashu avatar Mar 25 '19 10:03 mittalyashu

@mittalyashu I tried both and they failed.

Berkmann18 avatar Mar 25 '19 16:03 Berkmann18

@Berkmann18 Are you using Netlify Identity feature too?

mittalyashu avatar Mar 25 '19 16:03 mittalyashu

@Berkmann18 Try setting a site_domain in the backend options.

mittalyashu avatar Mar 25 '19 16:03 mittalyashu

Are you using Netlify Identity feature too?

Yup.

Try setting a site_domain in the backend options.

I tried setting it to compassionate-lalande-822e9b.netlify.com and I get the same errors in dev and production.

Berkmann18 avatar Mar 25 '19 16:03 Berkmann18