College Lutheran Church website running React
You will need to run web-jam-back for connection to database and authentication
Most local work runs over plain http (npm run dev → http://localhost:7777).
But the admin Reconnect Facebook button uses the Facebook JS SDK's FB.login,
which refuses to run on http:// pages. To exercise it locally, serve the dev
server over https with a self-signed cert:
-
Generate a self-signed cert into
.certs/(gitignored) — one time:mkdir -p .certs && openssl req -x509 -newkey rsa:2048 -nodes \ -keyout .certs/localhost.key -out .certs/localhost.crt \ -days 825 -subj "/CN=localhost" \ -addext "subjectAltName=DNS:localhost,IP:127.0.0.1"
-
npm run devnow serveshttps://localhost:7777(thedevscript setsDEV_HTTPS=true). With no certs present it silently falls back to http, so this is safe for anyone who skips the setup. Accept the browser's self-signed-cert warning the first time. -
One-time external setup for the https origin:
- web-jam-back
AllowUrlmust includehttps://localhost:7777(CORS). - Google OAuth client — add
https://localhost:7777to both Authorized JavaScript origins and Authorized redirect URIs, or Google login returns a 400 (the token-exchangeredirect_urimust match the scheme the auth code was issued under). - Meta app (Facebook) — add
localhostto Allowed Domains for the JavaScript SDK (and App Domains) in the Web Jam LLC app, orFB.loginfails with "JSSDK Unknown Host domain". The full domain list for every environment (including the productionweb-jam.comhost) is in web-jam-back's README.
- web-jam-back
When you log into Facebook to Reconnect, keep BOTH the CollegeLutheran and WebJamLLC pages checked. web-jam-back now serves both pages from the one "Web Jam LLC" Meta app (web-jam-back#799), and the Facebook consent dialog's page selection is a replace, not an add: unchecking a page you previously granted revokes the app's access to it and kills that page's stored token. So even though this admin only reconnects CollegeLutheran, leave WebJamLLC checked too (and vice-versa from the JaMmusic side).