pages-core
pages-core copied to clipboard
Netlify CMS: Inject configuration during build
User Story
To ease the configuration burden on users AND have better control over the authentication backend, determine whether injecting the required configuration for authenticating with Github via Federalist during build makes sense, and implement.
I imagine staging/production builds would inject corresponding urls for authentication. The configuration lives in the Netlify Configuration file, typically in admin/config.yml
though this is configurable.
backend:
name: github
repo: <repo> (Ex. 18F/federalist-uswds-jekyll)
base_url: <federalist url> (Ex. http://federalistapp-staging.18f.gov)
auth_endpoint: external/auth/github
Acceptance Criteria
- [x] Check to see if
admin
folder exists in base template directory, if true, overwriteconfig.yml
with default settings.
For callback URL use: GITHUB_CLIENT_EXTERNAL_CALLBACK_URL which should have the value of
@eddietejeda has moved this issue to "in-Progress but is this issue still blocked by #2230 @davemcorwin ?
@davemcorwin is GITHUB_CLIENT_EXTERNAL_CALLBACK_URL for passport callback or is assigned to "auth_endpoint" in admin/config.yml?
passport
Only injecting the configuration during build will prevent folks from authenticating during local development which will make it difficult to actually configure Netlify CMS.
This seems to just be handled by default theme settings now, right?
Not sure what you mean by "default theme settings". This has to be configured in every netlify cms config.
Sorry, misunderstood your original message. I get your point now.
So when you say "Only injecting the configuration during build will prevent folks from authenticating during local development"
What other options do we have?
Rework to possibly help with Pages migration. No guarantees.
No longer applicable.