-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Authentication problem if not running on localhost #1474
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
@kosirm Have you tried using GitLab implicit grant for login? You can see our docs here: https://www.netlifycms.org/docs/authentication-backends/#gitlab-backend. |
Thanks, @tech4him1 that's exactly the document I was following, maybe I'm doing something wrong, I don't know. I tried this and that... (Web Application Flow, Client-Side Implicit Grant) |
Do you have the identity widget script left on your CMS page? It needs to be removed if you use implicit grant. |
I don't know how to do this. Any detailed information highly appreciated. |
What is the output of your admin HTML? |
Thanks, @tech4him1 for an intelligent answer 😄 I commented¸out Netlify identity widget in site/static/admin/index.html and in site/static/partials/head.html . Now I get a login screen (username, password, login). If I try to log in with my Gitlab username/password, I get an error response in the console: POST http://my-site.c9users.io:8080/.netlify/identity/token 404 (Not Found). It's a step forward, but I still have no idea, what to do. |
Alright, what is the |
According to documentation, I added gitlab to my site/config.toml. Should I do something else? |
@kosirm Your Hugo config.toml is completly seperate from your CMS admin. They are seperate files in separate locations:
Your CMS settings should go in your CMS Does that make sense? 😄 |
Thank you so much for your time @tech4him1 !!! Stupid me. Ok, I found config.yml 😄 Finally I get gitlab login screen, I get gitlab login redirect, I login, but I don't get redirect back. Instead, I finish on Gitlab User settings page with error message: |
@kosirm have you set the |
Thanks @Benaiah, yes I referenced it like described. So client_id for Gitlab is the same as app_id? If so, I don't know... App id is what I get from Gitlab when I created application: Application Id | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.... |
@kosirm The |
Thank you much for help again @tech4him1 |
I believe I've had that problem before -- the Callback URL in GitLab must be the exact admin URL. It should include the |
I tried both (with and without /admin), it doesn't make difference for me. Maybe port number in the address could be a problem for Gitlab (???), I don't know... I will try with AWS Cloud 9 (I'm still using old Cloud 9), I think there is no port number required, because you are working on your "own" virtual box... |
Hey @kosirm, don't you get access to the NetlifyCMS admin when you deploy your site to Netlify? Or is that something different than the admin you get on local? Or are you not deploying to Netlify? Am I missing something? Thanks. |
@davidvm2 it should be the same thing if it could be opened 😄 The only problem is that netlify-cms authentication scripts are configured to work on a real localhost and I was using cloud 9 at that time. |
I have the same issue with GitHub backend.
I can access the content manager just normal when running on localhost, but not when accessing through github with baseurl (e.g. username.github.io/my_cms_project/admin). I get the following message when clicking on "Login with GitHub":
|
I am also seeing same problem with github, here is my configuration. (This is real production configuration). Site is hosted on s3 bucket and I am using aws cloudfront.
I am seeing following error when trying to browse https://company.goglides.com/admin
If i replaced site_domain with |
@hunhejj If you are not hosting on Netlify, you will need to run your own authentication server to use GitHub authentication: https://www.netlifycms.org/docs/authentication-backends/#github-backend. |
@pandeybk Do you have a Netlify site with domain "company.goglides.com" set up, and the API credentials configured? |
@tech4him1 you answered my question when you replied @hunhejj. I am not running on netlify, site is hosted on s3 bucket and I am using aws cloudfront. Looks like we need to update Netlify documents though, its not clear from documentation that we need to host on netlify to make it work. Anyways, thank you for your response. I will take a look on custom authentication server. |
Hey guys, I am getting the same error message like @pandeybk.
I already have my own authentication server running (as is required and statet out by @tech4him1). If i server my site locally i can navigate to /admin and click on "Login with GitHub" and it´s logging me in. But when i deploy the whole site to GH pages I am getting the "No Auth Provider Found" message. |
Okay, just forget about my last post. It was all my fault:
After adding this, it is working :-) |
When running Netlify CMS on localhost, a freebie auth server provided by Netlify (cms.netlify.com) is used by default: |
This issue seems to have become a "meta-issue" for a bunch of unrelated things that give very similar error messages. Let's try to classify these a bit so we can move forward:
|
@bskrypnyk Looks like you missed one of the steps in our GitHub backend setup docs:
|
@tech4him1 - Thank you, that worked! I did miss that. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Sorry to come in here, but it's still unclear in the documentation.... may it's me. netlifycms config:
@tech4him1
Well i have no side on netlify, thats why i choose the github provider. thanks! |
@Berndinox, these are the docs to follow: |
Solved by following this (not clearly linked in docs): |
Indeed! I've read the docs and a lot of issues and was only able to solve it by following the step you've referenced. Thank you a lot |
Hi, it would be great if we could use/develop NetlifyCMS sites on some Web IDE (Cloud 9, Codenvy, etc),
Currently, it is possible to use NetlifyCMS admin only on localhost, but it would be nice to show some love for Chromebook/Tablet/Convertible/etc. users...
The main problem is authentication.
I personally run NetlifyCMS on Cloud 9 with GitLab backend like described in docs, but can't access admin - there is always the same message in the popup: Failed to load settings from /.netlify/identity, and 404 error in console: GET http://my-site.c9users.io:8080/.netlify/identity/settings 404 (Not Found).
I use latest NetlifyCMS (1.9.2), latest Chrome on Windows.
If somebody knows for a working workarround I would be grateful for any info.
The text was updated successfully, but these errors were encountered: