pages-core icon indicating copy to clipboard operation
pages-core copied to clipboard

Netlify CMS: Inject configuration during build

Open davemcorwin opened this issue 5 years ago • 8 comments

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, overwrite config.yml with default settings.

For callback URL use: GITHUB_CLIENT_EXTERNAL_CALLBACK_URL which should have the value of /external/auth/github/callback

davemcorwin avatar May 28 '19 21:05 davemcorwin

@eddietejeda has moved this issue to "in-Progress but is this issue still blocked by #2230 @davemcorwin ?

amirbey avatar Jun 21 '19 14:06 amirbey

@davemcorwin is GITHUB_CLIENT_EXTERNAL_CALLBACK_URL for passport callback or is assigned to "auth_endpoint" in admin/config.yml?

amirbey avatar Jun 21 '19 20:06 amirbey

passport

davemcorwin avatar Jun 21 '19 20:06 davemcorwin

Only injecting the configuration during build will prevent folks from authenticating during local development which will make it difficult to actually configure Netlify CMS.

davemcorwin avatar Feb 19 '20 22:02 davemcorwin

This seems to just be handled by default theme settings now, right?

eddietejeda avatar Feb 19 '20 23:02 eddietejeda

Not sure what you mean by "default theme settings". This has to be configured in every netlify cms config.

davemcorwin avatar Feb 20 '20 00:02 davemcorwin

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?

eddietejeda avatar Feb 20 '20 00:02 eddietejeda

Rework to possibly help with Pages migration. No guarantees.

apburnes avatar Sep 29 '22 20:09 apburnes

No longer applicable.

apburnes avatar Jun 03 '24 18:06 apburnes