Netlify Identity - After Successful Authentication 'Not Found' Error Experienced

netlify site: zen-lamport-33ce9c

We’ve enabled Identity in the UI, added the ‘netlify identity widget’ to our site, and have oauth configured with github. Unfortunately we are getting the following error when attempting to access the admin page of our site:
error

From the browser console:

'text': '{\n'
'  "message": "Not Found",\n'
'  "documentation_url": '
'"https://docs.github.com/rest/reference/repos#get-a-branch"\n'
'}\n'},


'status': 404,
'statusText': 'Not Found'},

What kinds of config errors should we be on the lookout for?

Do you have a public repo by any chance? Also, are you pulling in the CMS via CDN option just to make sure everyone understands the implementation :slight_smile:

Does this occur on logging in? I was able to load the page with no errors prior to login.

We do not have a public repo, our site is associated with a private repo. We are not using a CDN to pull in CMS.

The error presents it itself after successful authentication.

We’ve since reverted our site to use github auth so people can keep working on it, but we’d like to get ‘Netlify Identity’ working.

Are you using netlify-cms-app then? https://github.com/netlify/netlify-cms/tree/master/packages/netlify-cms-app I didnt need to also add the netlify identity widget when using this as it comes with this package. It “just worked”.
If you have netlify identity widget for your site auth, maybe you need to ensure its not running when admin page is loaded?

Just throwing ideas out there sorry I cant give you a direct answer, its quite hard without access or more descriptive logs.

We are using the netlify-cms-app you describe. We removed the identity widget and encountered the same error. Which logs would provide more insight into this?

Hmm, I’m not an expert I’ve just been playing around with this a lot myself recently.
I’ll tag @Dennis who is an identity expert!

In the meantime, does this same issue occur locally, is it the same error if so?
If it was me I would be looking at the api requests being made, see what fails, it might not be finding a directory or file in your admin page, so if it looks like that you could also download you latest deploy zipped, and then see if any files or folders are missing that youd expect to be there.

Have you followed any particular guides to set this up as I could try to follow the same and see if I can recreate the error? I messed around with my own config and couldn’t get the error.

Ill link a resource here just incase there was an oversight in linking github as a backend:

Thanks for the help Aaron, we could not get this to work and decided to revert back to github oauth as it works well and we cant justify wasting more time on ‘netlify identity’ at the moment.

1 Like

Sorry to hear that! Hopefully in the meantime an engineer will pop by and offer some advice that you can use in the future.

Greetings @chrisg! :wave:t2:

I am also a Community Pilot here on The Community but I’ve got an extensive understanding of Netlify Identity. Hopefully I can help you out. First things first, I want to clarify that when you activated Netlify Identity for your site in the Netlify Admin interface, Netlify spun up an instance of the Netlify Identity service for you. That service is called GoTrue and it’s an open source project. That’s all a bit tertiary to your issue, but the point I’m wanting to make is that authenticating via GitHub is just a different way to register a user into your GoTrue instance. If that’s working, your Netlify Identity instance is working.

That said, you’ve clearly got an issue! :stuck_out_tongue: I’ve never seen a “Not Found” issue quite like that… but then, the login text-boxes typically look a little different too. Is this just a stock Netlify CMS? You didn’t make any changes to that, did you? The login panel from Netlify Identity typically looks like:

Either way, if you’re up for spending a bit of time working through it together, I’m sure we can get you there. You can also have traditional email/password auth enabled and GitHub auth enabled, so we could work on it even while your CMS users continue to authenticate via GitHub to do their work.

One other note I want to add is that if you do want to use GitHub OAuth, technically anybody with a GitHub account can log into your Netlify CMS unless you add very specific checks via special Netlify Functions. For the security of your site, please review those.


Jon

Tagging this with this other issue which I believe is exhibiting the same behavior and I have a hunch about.

@chrisg, I think that post that @jonsully linked to would be useful in your case. From experience, ‘Not found’ typically points to a permissions issue. Can you try the steps mentioned in the post and see if that helps? Basically, the following:

  • disabling Git Gateway in the Netlify UI,
  • revoking Netlify Auth access in my personal Github account (not the one where the repo lies) and then
  • enabling Git Gateway in the Netlify UI again
    has solved the problem

Let us know if that helps.