Backend not working on live site hosted on Netlify
Closed this issue · 3 comments
Hello, I used your Deploy to Netlify button and everything seems to work great except I can't login to the backend. But when I cloned the repo and viewed the site locally it worked perfectly.
I tried everything I could think of to get it to work on the live site including...
- Enabled Identity for the site in its Netlify Dashboard
- Installed the netlify-identity-widget
- Edited all the config files to use my GitHub information instead of yours
- Created a OAuth App on Github and Connected the site to it in its Netlify Dashboard
- In Netlify Dashboard I went to Settings > Identity > Registration > External Providers and I added GitHub
- I think I tried some other stuff that I forgot as well.
But no matter what I tried, I always got the following screen in a popup after I clicking "login with GitHub" from "/admin" on the live site...
I'm about to start over, can you please tell me which of the things I tried was actually necessary if any of them. I'm starting to wonder if Netlify Identity is needed at all.
Anyways can you please help me figure out how to get the backend working on a live site hosted on Netlify?
Thanks,
Chris
I just had the same problem. I looked at another site and the config file had this:
backend:
name: git-gateway
Note the git-gateway, I changed it to that and it works. I also put in a index.html file in the admin folder, but I am not sure if that was needed or not. https://gist.github.com/theapplegates/e76fee3c9ff723dda2c6b1e85e82125b
The index file was mentioned in Netlify's instructions for the CMS. Hope that helps.
Great @theapplegates .
Have you tried the same solution @cmarabate ? Please, let me now.
Thanks.
README.md was updated to have this information:
backend:
name: github # Local
# name: git-gateway # Prod
repo: _owner-name/repo-name_ # Path to your GitHub repository
branch: master
site_domain: _site-url_ # If site extists
Realize that you need to use name: github for local development and name: git-gateway for prod environment (netlify)