netlify-cms-cloudflare-pages icon indicating copy to clipboard operation
netlify-cms-cloudflare-pages copied to clipboard

OAuth not presenting itself.

Open sagewaters opened this issue 1 year ago • 6 comments

First off: Thank you for sharing this, as it is much needed.

Unfortunately, it doesn't seem to be working for me. When heading to Netlify CMS login at /admin/ seeing login options for email and password but no GitHub authorization button.

In fact, it seems to be redirecting to /admin/#/ rather than the Github authorization page.

sagewaters avatar Apr 18 '23 16:04 sagewaters

So you don't even get the Github button? Did you set up the config.yml for the CMS, as well as adding the app to your Github account? I'm not actually using this right now but I just tried it and it still works for me.

i40west avatar Apr 18 '23 20:04 i40west

Yes on both counts. Your instructions were excellent. Everything seems to be in order, but no go.

Still puttering around with the problem, but I suspect it has something to do with the 11ty template I was experimenting with. It was originally designed for Netlify deployment, so perhaps there is something in there I am missing that is causing the issue. Will try again with a clean setup.

That said, thank you very much for the kind and quick reply. If I figure out what error I'm making (and manage to resolve it) I will share it here.

sagewaters avatar Apr 20 '23 05:04 sagewaters

Hmmm, same problem here, and just double check my config still don't work for me. are you fixed this? really want to make Netlify CMS work with Cloudflare Pages:-(

F1ySyn avatar Nov 17 '23 15:11 F1ySyn

@F1ySyn I just tried and am still unable to reproduce the problem.

One thing I thought of: Are you using a framework like Next.js or something that deploys a _worker.js for server-side code? The Pages /functions directory is not compatible with using a manual-mode _worker.js so that definitely wouldn't work...

i40west avatar Nov 20 '23 07:11 i40west

I encountered a similar problem (I only saw the 'Netlify identify' button, no other means of authentication). Copying static/admin/index.html to static/admin/ (and configuring github in static/admin/config.yml) of my repo fixed this.

As a side note, I would consider copying the index.html of https://github.com/SubhenduX/decap-cms-cloudflare-pages instead, as SubhenduX already went to the trouble to rename and update it to Decap CMS.

bverhagen avatar Mar 17 '24 20:03 bverhagen

Actually, to make it work in Decap CMS 3.1.0, I had to add some more configuration settings to static/admin/config.yml (I assume some default values changed in the newer versions). My full Github-related config is:

backend:
  name: github
  repo: <github user | github organization>/<github repo>
  branch: main
  site_domain: <your site domain>
  base_url: <your site domain>
  auth_endpoint: /api/auth

bverhagen avatar Mar 17 '24 20:03 bverhagen

Opened PR #7 for this.

ramiro avatar Jun 26 '24 18:06 ramiro

Opened PR #7 for this.

Merged, thanks!

i40west avatar Jun 26 '24 19:06 i40west