No Auth Provider Found
28development opened this issue ยท 12 comments
I am still unable to access my netlify backend within my webapp.
I am trying to login like this on production:
https://myurl.test.io/admin/index.html#/
After trying to signing I get this Netlify error:
No Auth Provider Found
Make sure you've configured the API credentials for Github from the Access part of your Netlify site dashboard.
This is my .yaml file:
backend:
name: 'github'
repo: 28development/myapp
branch: main
base_url: 'https://myapp.test.io'
auth_endpoint: api/auth
media_folder: public/img
public_folder: /img
locale: 'de'
local_backend: true
Not sure what I am missing.
It looks like you've missed off the base_url
and auth_endpoint
sections of your config.yml
. Double check you've completed each step in the README.md, it sounds like the error is coming from Netlify's auth backend which isn't what you want at all if you're running this on Vercel.
What exactly do you mean with
It looks like you've missed off the base_url and auth_endpoint sections of your config.yml
I set them up properly, I double-checked the documentation now and my Github client id and secret.
Right now I get a 404 error after trying to sign in here https://myapp.test.io/admin/index.html
https://myapp.test.io/api/auth/?provider=github&site_id=myapp.test.io&scope=repo
Any idea what I am missing?
I misread your config file the first time and didn't see the values at the bottom. The auth_endpoint
and base_url
options need to go inside the backend
object, so underneath branch
and indented with 2 spaces (if you aren't familiar with YAML).
What happens when those values are set there?
Hi @robb-j,
I did not update the yml sorry, file I am using it that way, I still get the same error.
Hi,
nah that does not fix it, this: https://myurl.test.io/admin/index.html
redirects to https://myurl.test.io/admin/index.html#/
I already have the trailing slash option enabled.
Its strange if I click on the netlify login button it opens a window with this URL
https://myurl.test.io/api/auth/?provider=github&site_id=myurl.test.io&scope=repo
But it changes the URL to this after a second
https://myurl.test.io/api/auth?provider=github&site_id=myurl.test.io&scope=repo
Can you just access your admin page like this:
https://myurl.test.io/admin/
that's how I've always used it. I don't think you need the .html bit.
Ohh wait If I try that https://myurl.test.io/admin/
it returns a 404 but if I try, but if I try https://myurl.test.io/admin#/
I get following error:
Error loading the CMS configuration
Config Errors:
Error: Failed to load config.yml (404)
Check your config.yml file.
It is search the XML file here /mydomain/config.yml
not inside the admin directory, this is wrong right?
I have the index.html (which loads netlify) and the config.yml located inside
public/admin/
IT WORKED FINALLY ๐ฏ
So these are my changes:
vercel.json
{
"trailingSlash": false
}
And further, I moved my config.yml
file from public/admin
to public
somehow it tried to look the file from there.
I'm glad you got this working! ๐ for reference here is the folder structure I've been using with this package. I didn't know about the public
folder.
.
โโโ README.md
โโโ admin
โ โโโ config.yml
โ โโโ index.html
โโโ api
โ โโโ auth.ts
โ โโโ callback.ts
โ โโโ index.ts
โโโ content
โ โโโ ...