File size: 71,468 Bytes
3d16fe6
896453f
 
1f7780e
896453f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fcf298e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
<!doctype html><html lang=en dir=ltr class="docs-wrapper plugin-docs plugin-id-default docs-version-current docs-doc-page docs-doc-id-deployment/authentication-setup" data-has-hydrated=false><head><meta charset=UTF-8><meta name=generator content="Docusaurus v3.10.0"><title data-rh=true>Authentication Setup Guide | Open Navigator</title><meta data-rh=true name=viewport content="width=device-width, initial-scale=1.0"/><meta data-rh=true property=og:image content=https://www.communityone.com/img/docusaurus-social-card.jpg /><meta data-rh=true name=twitter:image content=https://www.communityone.com/img/docusaurus-social-card.jpg /><meta data-rh=true property=og:url content=https://www.communityone.com/docs/deployment/authentication-setup /><meta data-rh=true property=og:locale content=en /><meta data-rh=true name=docusaurus_locale content=en /><meta data-rh=true name=docsearch:language content=en /><meta data-rh=true name=keywords content="civic engagement, policy tracking, meeting minutes, nonprofit tracking, municipal government, advocacy, open data, local government"/><meta data-rh=true property=og:type content=website /><meta data-rh=true property=og:site_name content="Open Navigator"/><meta data-rh=true name=twitter:card content=summary_large_image /><meta data-rh=true name=docusaurus_version content=current /><meta data-rh=true name=docusaurus_tag content=docs-default-current /><meta data-rh=true name=docsearch:version content=current /><meta data-rh=true name=docsearch:docusaurus_tag content=docs-default-current /><meta data-rh=true property=og:title content="Authentication Setup Guide | Open Navigator"/><meta data-rh=true name=description content="Complete guide for setting up OAuth authentication with HuggingFace, Google, Facebook, and GitHub, plus Neon serverless PostgreSQL."/><meta data-rh=true property=og:description content="Complete guide for setting up OAuth authentication with HuggingFace, Google, Facebook, and GitHub, plus Neon serverless PostgreSQL."/><link data-rh=true rel=icon href=/img/favicon.ico /><link data-rh=true rel=canonical href=https://www.communityone.com/docs/deployment/authentication-setup /><link data-rh=true rel=alternate href=https://www.communityone.com/docs/deployment/authentication-setup hreflang=en /><link data-rh=true rel=alternate href=https://www.communityone.com/docs/deployment/authentication-setup hreflang=x-default /><script data-rh=true type=application/ld+json>{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","item":"https://www.communityone.com/docs/for-developers","name":"Developers & Technical Users","position":1},{"@type":"ListItem","item":"https://www.communityone.com/docs/deployment/authentication-setup","name":"Authentication Setup Guide","position":2}]}</script><link rel=alternate type=application/rss+xml href=/blog/rss.xml title="Open Navigator RSS Feed"><link rel=alternate type=application/atom+xml href=/blog/atom.xml title="Open Navigator Atom Feed"><link rel=preconnect href=https://www.google-analytics.com><link rel=preconnect href=https://www.googletagmanager.com><script async src="https://www.googletagmanager.com/gtag/js?id=G-5EQV815915"></script><script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-5EQV815915",{anonymize_ip:!0})</script><link rel=stylesheet href=/assets/css/styles.c89d6b2d.css /><script src=/assets/js/runtime~main.c8fa085e.js defer></script><script src=/assets/js/main.6e24e536.js defer></script></head><body><svg style="display: none;"><defs>
<symbol id=theme-svg-external-link viewBox="0 0 24 24"><path fill=currentColor d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"/></symbol>
</defs></svg>
<script>!function(){var t=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return window.localStorage.getItem("theme-7e9")}catch(t){}}();document.documentElement.setAttribute("data-theme",t||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")),document.documentElement.setAttribute("data-theme-choice",t||"system")}(),function(){try{for(var[t,e]of new URLSearchParams(window.location.search).entries())if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}()</script><div id=__docusaurus><link rel=preload as=image href=/img/communityone_logo.svg /><script type=application/ld+json>{"@context":"https://schema.org","@type":"Organization","address":{"@type":"PostalAddress","addressCountry":"US","addressLocality":"Tuscaloosa","addressRegion":"AL","postalCode":"35406","streetAddress":"5617 Lakeridge Court"},"contactPoint":{"@type":"ContactPoint","availableLanguage":["English"],"contactType":"Customer Service","email":"johnbowyer@communityone.com"},"description":"Track 90,000+ jurisdictions, 1.8M nonprofits, and analyze meeting minutes with AI. The open path to everything local.","email":"johnbowyer@communityone.com","legalName":"CommunityOne","logo":"https://www.communityone.com/img/communityone_logo.svg","name":"CommunityOne","sameAs":["https://www.facebook.com/communityone","https://www.instagram.com/communityone","https://twitter.com/communityone","https://www.linkedin.com/company/communityone","https://www.youtube.com/@communityone","https://discord.gg/communityone","https://github.com/getcommunityone/open-navigator"],"url":"https://www.communityone.com"}</script><script type=application/ld+json>{"@context":"https://schema.org","@type":"WebSite","alternateName":"CommunityOne Open Navigator","description":"AI-powered civic engagement platform tracking jurisdictions, nonprofits, and government meetings","name":"Open Navigator","potentialAction":{"@type":"SearchAction","query-input":"required name=search_term_string","target":{"@type":"EntryPoint","urlTemplate":"https://www.communityone.com/search?q={search_term_string}"}},"url":"https://www.communityone.com"}</script><script type=application/ld+json>{"@context":"https://schema.org","@type":"SoftwareApplication","aggregateRating":{"@type":"AggregateRating","ratingCount":"1","ratingValue":"5"},"applicationCategory":"BusinessApplication","description":"Track 90,000+ jurisdictions, 1.8M nonprofits, and analyze meeting minutes with AI","featureList":["Track 90,000+ jurisdictions","Monitor 1.8M nonprofits","Analyze meeting minutes","Legislative bill tracking","Campaign finance data"],"name":"Open Navigator","offers":{"@type":"Offer","price":"0","priceCurrency":"USD"},"operatingSystem":"Web","screenshot":"https://www.communityone.com/img/docusaurus-social-card.jpg","softwareVersion":"1.0.0"}</script><div role=region aria-label="Skip to main content"><a class=skipToContent_fXgn href=#__docusaurus_skipToContent_fallback>Skip to main content</a></div><nav aria-label=Main class="theme-layout-navbar navbar navbar--fixed-top"><div class=navbar__inner><div class="theme-layout-navbar-left navbar__items"><button aria-label="Toggle navigation bar" aria-expanded=false class="navbar__toggle clean-btn" type=button><svg width=30 height=30 viewBox="0 0 30 30" aria-hidden=true><path stroke=currentColor stroke-linecap=round stroke-miterlimit=10 stroke-width=2 d="M4 7h22M4 15h22M4 23h22"/></svg></button><a href=https://www.communityone.com target=_self rel="noopener noreferrer" class=navbar__brand><div class=navbar__logo><img src=/img/communityone_logo.svg alt="CommunityOne Logo" class="themedComponent_mlkZ themedComponent--light_NVdE"/><img src=/img/communityone_logo.svg alt="CommunityOne Logo" class="themedComponent_mlkZ themedComponent--dark_xIcU"/></div><b class="navbar__title text--truncate">Open Navigator Home</b></a><a class="navbar__item navbar__link" href=/docs/intro>Getting Started</a><a class="navbar__item navbar__link" href=/docs/for-families>Families & Individuals</a><a class="navbar__item navbar__link" href=/docs/for-advocates>Policy Makers</a><a class="navbar__item navbar__link" href=/docs/for-developers>Developers</a><a class="navbar__item navbar__link" href=/docs/data-sources/citations>Data and Terms</a><a class="navbar__item navbar__link" href=/blog>Blog</a></div><div class="theme-layout-navbar-right navbar__items navbar__items--right"><a href=https://github.com/getcommunityone/open-navigator-for-engagement target=_blank rel="noopener noreferrer" class="navbar__item navbar__link">GitHub<svg width=13.5 height=13.5 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a><div class="toggle_vylO colorModeToggle_DEke"><button class="clean-btn toggleButton_gllP toggleButtonDisabled_aARS" type=button disabled title="system mode" aria-label="Switch between dark and light mode (currently system mode)"><svg viewBox="0 0 24 24" width=24 height=24 aria-hidden=true class="toggleIcon_g3eP lightToggleIcon_pyhR"><path fill=currentColor d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"/></svg><svg viewBox="0 0 24 24" width=24 height=24 aria-hidden=true class="toggleIcon_g3eP darkToggleIcon_wfgR"><path fill=currentColor d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"/></svg><svg viewBox="0 0 24 24" width=24 height=24 aria-hidden=true class="toggleIcon_g3eP systemToggleIcon_QzmC"><path fill=currentColor d="m12 21c4.971 0 9-4.029 9-9s-4.029-9-9-9-9 4.029-9 9 4.029 9 9 9zm4.95-13.95c1.313 1.313 2.05 3.093 2.05 4.95s-0.738 3.637-2.05 4.95c-1.313 1.313-3.093 2.05-4.95 2.05v-14c1.857 0 3.637 0.737 4.95 2.05z"/></svg></button></div><div class=navbarSearchContainer_Bca1></div></div></div><div role=presentation class=navbar-sidebar__backdrop></div></nav><div id=__docusaurus_skipToContent_fallback class="theme-layout-main main-wrapper mainWrapper_z2l0"><div class=docsWrapper_hBAB><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type=button></button><div class=docRoot_UBD9><aside class="theme-doc-sidebar-container docSidebarContainer_YfHR"><div class=sidebarViewport_aRkj><div class=sidebar_njMd><nav aria-label="Docs sidebar" class="menu thin-scrollbar menu_SIkG"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role=button aria-expanded=true href=/docs/intro><span title="Getting Started" class=categoryLinkLabel_W154>Getting Started</span></a></div><ul class=menu__list><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/intro><span title=Introduction class=linkLabel_WmDU>Introduction</span></a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/open-navigator><span title="Open Navigator" class=linkLabel_WmDU>Open Navigator</span></a></ul><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist" href=/docs/for-families><span title="Families & Individuals" class=categoryLinkLabel_W154>Families & Individuals</span></a><button aria-label="Collapse sidebar category 'Families & Individuals'" aria-expanded=true type=button class="clean-btn menu__caret"></button></div><ul class=menu__list><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role=button aria-expanded=false tabindex=0 href=/docs/families/community-events><span title="Resources for Families" class=categoryLinkLabel_W154>Resources for Families</span></a></div><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/open-navigator><span title="Getting Started with Open Navigator" class=linkLabel_WmDU>Getting Started with Open Navigator</span></a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class=menu__link tabindex=0 href=/docs/data-sources/citations><span title="Data and Citations" class=linkLabel_WmDU>Data and Citations</span></a></ul><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist" href=/docs/for-advocates><span title="Policy Makers & Advocates" class=categoryLinkLabel_W154>Policy Makers & Advocates</span></a><button aria-label="Collapse sidebar category 'Policy Makers & Advocates'" aria-expanded=true type=button class="clean-btn menu__caret"></button></div><ul class=menu__list><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role=button aria-expanded=false tabindex=0 href=/docs/data-sources/overview><span title="Understanding the Data" class=categoryLinkLabel_W154>Understanding the Data</span></a></div><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role=button aria-expanded=false tabindex=0 href=/docs/guides/political-economy><span title="Analysis & Strategy" class=categoryLinkLabel_W154>Analysis & Strategy</span></a></div><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role=button aria-expanded=false tabindex=0 href=/docs/case-studies/tuscaloosa-complete><span title="Real-World Examples" class=categoryLinkLabel_W154>Real-World Examples</span></a></div></ul><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--active" href=/docs/for-developers><span title="Developers & Technical Users" class=categoryLinkLabel_W154>Developers & Technical Users</span></a><button aria-label="Collapse sidebar category 'Developers & Technical Users'" aria-expanded=true type=button class="clean-btn menu__caret"></button></div><ul class=menu__list><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role=button aria-expanded=false tabindex=0 href=/docs/quickstart><span title="Setup & Installation" class=categoryLinkLabel_W154>Setup & Installation</span></a></div><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role=button aria-expanded=false tabindex=0 href=/docs/data-sources/citations><span title="Data Sources (Technical)" class=categoryLinkLabel_W154>Data Sources (Technical)</span></a></div><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role=button aria-expanded=false tabindex=0 href=/docs/guides/jurisdiction-setup><span title="How-To Guides" class=categoryLinkLabel_W154>How-To Guides</span></a></div><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role=button aria-expanded=false tabindex=0 href=/docs/integrations/mcp-server><span title=Integrations class=categoryLinkLabel_W154>Integrations</span></a></div><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" role=button aria-expanded=true tabindex=0 href=/docs/deployment/databricks-apps><span title=Deployment class=categoryLinkLabel_W154>Deployment</span></a></div><ul class=menu__list><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class=menu__link tabindex=0 href=/docs/deployment/databricks-apps><span title="Databricks Apps Deployment Guide" class=linkLabel_WmDU>Databricks Apps Deployment Guide</span></a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class=menu__link tabindex=0 href=/docs/deployment/databricks-migration><span title="Databricks Agent Bricks Refactoring - Summary" class=linkLabel_WmDU>Databricks Agent Bricks Refactoring - Summary</span></a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class=menu__link tabindex=0 href=/docs/deployment/quickstart-databricks><span title="Quick Start Guide - React + FastAPI Databricks App" class=linkLabel_WmDU>Quick Start Guide - React + FastAPI Databricks App</span></a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class=menu__link tabindex=0 href=/docs/deployment/huggingface-spaces><span title="Hugging Face Spaces Deployment" class=linkLabel_WmDU>Hugging Face Spaces Deployment</span></a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class=menu__link tabindex=0 href=/docs/deployment/oauth-providers-setup><span title="OAuth Providers Setup" class=linkLabel_WmDU>OAuth Providers Setup</span></a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link menu__link--active" aria-current=page tabindex=0 href=/docs/deployment/authentication-setup><span title="Authentication Setup Guide" class=linkLabel_WmDU>Authentication Setup Guide</span></a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class=menu__link tabindex=0 href=/docs/deployment/schema-migration><span title="Schema Migration Guide" class=linkLabel_WmDU>Schema Migration Guide</span></a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class=menu__link tabindex=0 href=/docs/deployment/build-verification><span title="Build Verification & CI/CD" class=linkLabel_WmDU>Build Verification & CI/CD</span></a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class=menu__link tabindex=0 href=/docs/deployment/variable-migration><span title="πŸ”„ Variable Name Migration Guide" class=linkLabel_WmDU>πŸ”„ Variable Name Migration Guide</span></a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class=menu__link tabindex=0 href=/docs/deployment/d-drive-configuration><span title="D Drive Configuration for Large Datasets" class=linkLabel_WmDU>D Drive Configuration for Large Datasets</span></a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class=menu__link tabindex=0 href=/docs/deployment/docker-troubleshooting><span title="πŸ› Docker Build Troubleshooting Guide" class=linkLabel_WmDU>πŸ› Docker Build Troubleshooting Guide</span></a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class=menu__link tabindex=0 href=/docs/deployment/build-protection><span title="Build Protection & CI/CD" class=linkLabel_WmDU>Build Protection & CI/CD</span></a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class=menu__link tabindex=0 href=/docs/deployment/rename-repository><span title="Rename Repository & Make Public" class=linkLabel_WmDU>Rename Repository & Make Public</span></a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class=menu__link tabindex=0 href=/docs/deployment/costs><span title="πŸ’° Cost Breakdown: $0 for Data Access" class=linkLabel_WmDU>πŸ’° Cost Breakdown: $0 for Data Access</span></a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class=menu__link tabindex=0 href=/docs/deployment/jurisdiction-discovery><span title="Jurisdiction Discovery - Deployment Options" class=linkLabel_WmDU>Jurisdiction Discovery - Deployment Options</span></a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class=menu__link tabindex=0 href=/docs/deployment/scale><span title="πŸš€ RUNNING DISCOVERY FOR ALL U.S. CITIES AND COUNTIES" class=linkLabel_WmDU>πŸš€ RUNNING DISCOVERY FOR ALL U.S. CITIES AND COUNTIES</span></a><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class=menu__link tabindex=0 href=/docs/deployment/storage><span title="πŸ’° COST-EFFECTIVE STORAGE STRATEGY (Personal Budget)" class=linkLabel_WmDU>πŸ’° COST-EFFECTIVE STORAGE STRATEGY (Personal Budget)</span></a></ul><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class=menu__list-item-collapsible><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role=button aria-expanded=false tabindex=0 href=/docs/development/database-setup><span title=Development class=categoryLinkLabel_W154>Development</span></a></div></ul></ul></nav></div></div></aside><main class=docMainContainer_TBSr><div class="container padding-top--md padding-bottom--lg"><div class=row><div class="col docItemCol_VOVn"><div class=docItemContainer_Djhp><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Z_bl" aria-label=Breadcrumbs><ul class=breadcrumbs><li class=breadcrumbs__item><a aria-label="Home page" class=breadcrumbs__link href=/><svg viewBox="0 0 24 24" class=breadcrumbHomeIcon_YNFT><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill=currentColor /></svg></a><li class=breadcrumbs__item><a class=breadcrumbs__link href=/docs/for-developers><span>Developers & Technical Users</span></a><li class=breadcrumbs__item><span class=breadcrumbs__link>Deployment</span><li class="breadcrumbs__item breadcrumbs__item--active"><span class=breadcrumbs__link>Authentication Setup Guide</span></ul></nav><div class="tocCollapsible_ETCw theme-doc-toc-mobile tocMobile_ITEo"><button type=button class="clean-btn tocCollapsibleButton_TO0P">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Authentication Setup Guide</h1></header>
<p>Complete guide for setting up OAuth authentication with HuggingFace, Google, Facebook, and GitHub, plus Neon serverless PostgreSQL.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=-database-setup-neon-serverless-postgresql>πŸ₯‡ Database Setup: Neon (Serverless PostgreSQL)<a href=#-database-setup-neon-serverless-postgresql class=hash-link aria-label="Direct link to πŸ₯‡ Database Setup: Neon (Serverless PostgreSQL)" title="Direct link to πŸ₯‡ Database Setup: Neon (Serverless PostgreSQL)" translate=no>​</a></h2>
<p><strong>Recommended Choice</strong> - Free tier, zero-config, perfect for production.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=why-neon>Why Neon?<a href=#why-neon class=hash-link aria-label="Direct link to Why Neon?" title="Direct link to Why Neon?" translate=no>​</a></h3>
<p>βœ… <strong>Free tier</strong>: 0.5 GB storage with scale-to-zero<br/>
<!-- -->βœ… <strong>Managed backups</strong>: Point-in-time recovery included<br/>
<!-- -->βœ… <strong>Encrypted</strong>: At rest + in transit<br/>
<!-- -->βœ… <strong>Public internet</strong>: Perfect for HuggingFace Spaces<br/>
<!-- -->βœ… <strong>Standard PostgreSQL</strong>: No vendor lock-in<br/>
<!-- -->βœ… <strong>Enterprise backing</strong>: Acquired by Databricks (2025)</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=setup-steps>Setup Steps<a href=#setup-steps class=hash-link aria-label="Direct link to Setup Steps" title="Direct link to Setup Steps" translate=no>​</a></h3>
<ol>
<li class="">
<p><strong>Sign up at <a href=https://neon.tech target=_blank rel="noopener noreferrer" class="">neon.tech</a></strong></p>
<ul>
<li class="">Click "Sign up" (free, no credit card required)</li>
<li class="">Sign in with GitHub or email</li>
</ul>
</li>
<li class="">
<p><strong>Create a new project</strong></p>
<ul>
<li class="">Click "New Project"</li>
<li class="">Name: <code>open-navigator-engagement</code></li>
<li class="">Region: Choose closest to your users (e.g., <code>US East</code>)</li>
<li class="">PostgreSQL version: 16 (latest)</li>
</ul>
</li>
<li class="">
<p><strong>Copy connection string</strong></p>
<ul>
<li class="">Go to Dashboard β†’ Connection Details</li>
<li class="">Copy the <strong>"Connection string"</strong></li>
<li class="">Format: <code>postgresql://user:password@ep-xxx.us-east-2.aws.neon.tech/neondb?sslmode=require</code></li>
</ul>
</li>
<li class="">
<p><strong>Add to <code>.env</code> file</strong></p>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style=--prism-color:#393A34;--prism-background-color:#f6f8fa><div class=codeBlockContent_QJqH><pre tabindex=0 class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style=color:#393A34;background-color:#f6f8fa><code class=codeBlockLines_e6Vv><div class=token-line style=color:#393A34><span class="token plain">DATABASE_URL=postgresql://user:password@ep-xxx.us-east-2.aws.neon.tech/neondb?sslmode=require</span><br/></div></code></pre></div></div>
</li>
<li class="">
<p><strong>Database auto-initialization</strong></p>
<ul>
<li class="">Tables are created automatically on first API startup</li>
<li class="">No migration scripts needed!</li>
</ul>
</li>
</ol>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=verify-connection>Verify Connection<a href=#verify-connection class=hash-link aria-label="Direct link to Verify Connection" title="Direct link to Verify Connection" translate=no>​</a></h3>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style=--prism-color:#393A34;--prism-background-color:#f6f8fa><div class=codeBlockContent_QJqH><pre tabindex=0 class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style=color:#393A34;background-color:#f6f8fa><code class=codeBlockLines_e6Vv><div class=token-line style=color:#393A34><span class="token plain"># Start the API server</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">source .venv/bin/activate</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">python main.py serve</span><br/></div><div class=token-line style=color:#393A34><span class="token plain" style=display:inline-block></span><br/></div><div class=token-line style=color:#393A34><span class="token plain"># You should see:</span><br/></div><div class=token-line style=color:#393A34><span class="token plain"># βœ… Database initialized at: postgresql://...</span><br/></div></code></pre></div></div>
<hr/>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=-oauth-provider-setup>πŸ” OAuth Provider Setup<a href=#-oauth-provider-setup class=hash-link aria-label="Direct link to πŸ” OAuth Provider Setup" title="Direct link to πŸ” OAuth Provider Setup" translate=no>​</a></h2>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=1-huggingface-oauth>1. HuggingFace OAuth<a href=#1-huggingface-oauth class=hash-link aria-label="Direct link to 1. HuggingFace OAuth" title="Direct link to 1. HuggingFace OAuth" translate=no>​</a></h3>
<p><strong>Get credentials:</strong> <a href=https://huggingface.co/settings/applications target=_blank rel="noopener noreferrer" class="">huggingface.co/settings/applications</a></p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=steps>Steps:<a href=#steps class=hash-link aria-label="Direct link to Steps:" title="Direct link to Steps:" translate=no>​</a></h4>
<ol>
<li class="">Go to HuggingFace Settings β†’ Applications</li>
<li class="">Click <strong>"Create an OAuth app"</strong></li>
<li class="">Fill in:<!-- -->
<ul>
<li class=""><strong>Application name</strong>: <code>Open Navigator</code></li>
<li class=""><strong>Homepage URL</strong>: <code>https://www.communityone.com</code></li>
<li class=""><strong>Redirect URI</strong>:<!-- -->
<ul>
<li class="">Development: <code>http://localhost:8000/auth/callback/huggingface</code></li>
<li class="">Production: <code>https://www.communityone.com/api/auth/callback/huggingface</code></li>
</ul>
</li>
<li class=""><strong>Scopes</strong>: <code>openid profile email</code></li>
</ul>
</li>
<li class="">Click <strong>"Create"</strong></li>
<li class="">Copy <strong>Client ID</strong> and <strong>Client Secret</strong></li>
</ol>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=add-to-env>Add to <code>.env</code>:<a href=#add-to-env class=hash-link aria-label="Direct link to add-to-env" title="Direct link to add-to-env" translate=no>​</a></h4>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style=--prism-color:#393A34;--prism-background-color:#f6f8fa><div class=codeBlockContent_QJqH><pre tabindex=0 class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style=color:#393A34;background-color:#f6f8fa><code class=codeBlockLines_e6Vv><div class=token-line style=color:#393A34><span class="token plain">HUGGINGFACE_CLIENT_ID=hf_oauth_xxx</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">HUGGINGFACE_CLIENT_SECRET=hf_oauth_secret_xxx</span><br/></div></code></pre></div></div>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=2-google-oauth>2. Google OAuth<a href=#2-google-oauth class=hash-link aria-label="Direct link to 2. Google OAuth" title="Direct link to 2. Google OAuth" translate=no>​</a></h3>
<p><strong>Get credentials:</strong> <a href=https://console.cloud.google.com/apis/credentials target=_blank rel="noopener noreferrer" class="">console.cloud.google.com/apis/credentials</a></p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=steps-1>Steps:<a href=#steps-1 class=hash-link aria-label="Direct link to Steps:" title="Direct link to Steps:" translate=no>​</a></h4>
<ol>
<li class="">
<p><strong>Create a project</strong> (or select existing)</p>
<ul>
<li class="">Go to Google Cloud Console</li>
<li class="">Select project or click "New Project"</li>
<li class="">Name: <code>Open Navigator</code></li>
</ul>
</li>
<li class="">
<p><strong>Enable Google+ API</strong></p>
<ul>
<li class="">Go to APIs & Services β†’ Library</li>
<li class="">Search "Google+ API"</li>
<li class="">Click Enable</li>
</ul>
</li>
<li class="">
<p><strong>Configure OAuth consent screen</strong></p>
<ul>
<li class="">Go to APIs & Services β†’ OAuth consent screen</li>
<li class="">User Type: <strong>External</strong></li>
<li class="">App name: <code>Open Navigator</code></li>
<li class="">User support email: Your email</li>
<li class="">Developer contact: Your email</li>
<li class="">Scopes: <code>email</code>, <code>profile</code>, <code>openid</code></li>
</ul>
</li>
<li class="">
<p><strong>Create OAuth 2.0 Client ID</strong></p>
<ul>
<li class="">Go to APIs & Services β†’ Credentials</li>
<li class="">Click <strong>"Create Credentials"</strong> β†’ OAuth client ID</li>
<li class="">Application type: <strong>Web application</strong></li>
<li class="">Name: <code>Open Navigator Web Client</code></li>
<li class="">Authorized redirect URIs:<!-- -->
<ul>
<li class=""><code>http://localhost:8000/auth/callback/google</code> (development)</li>
<li class=""><code>https://www.communityone.com/api/auth/callback/google</code> (production)</li>
</ul>
</li>
<li class="">Click <strong>"Create"</strong></li>
</ul>
</li>
<li class="">
<p>Copy <strong>Client ID</strong> and <strong>Client Secret</strong></p>
</li>
</ol>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=add-to-env-1>Add to <code>.env</code>:<a href=#add-to-env-1 class=hash-link aria-label="Direct link to add-to-env-1" title="Direct link to add-to-env-1" translate=no>​</a></h4>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style=--prism-color:#393A34;--prism-background-color:#f6f8fa><div class=codeBlockContent_QJqH><pre tabindex=0 class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style=color:#393A34;background-color:#f6f8fa><code class=codeBlockLines_e6Vv><div class=token-line style=color:#393A34><span class="token plain">GOOGLE_CLIENT_ID=123456789-xxxxx.apps.googleusercontent.com</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">GOOGLE_CLIENT_SECRET=GOCSPX-xxxxx</span><br/></div></code></pre></div></div>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=3-facebook-oauth>3. Facebook OAuth<a href=#3-facebook-oauth class=hash-link aria-label="Direct link to 3. Facebook OAuth" title="Direct link to 3. Facebook OAuth" translate=no>​</a></h3>
<p><strong>Get credentials:</strong> <a href=https://developers.facebook.com/apps target=_blank rel="noopener noreferrer" class="">developers.facebook.com/apps</a></p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=steps-2>Steps:<a href=#steps-2 class=hash-link aria-label="Direct link to Steps:" title="Direct link to Steps:" translate=no>​</a></h4>
<ol>
<li class="">
<p><strong>Create a new app</strong></p>
<ul>
<li class="">Click <strong>"Create App"</strong></li>
<li class="">Type: <strong>Consumer</strong></li>
<li class="">App Name: <code>Open Navigator</code></li>
</ul>
</li>
<li class="">
<p><strong>Add Facebook Login</strong></p>
<ul>
<li class="">Dashboard β†’ Add Product</li>
<li class="">Select <strong>"Facebook Login"</strong> β†’ Set up</li>
</ul>
</li>
<li class="">
<p><strong>Configure OAuth settings</strong></p>
<ul>
<li class="">Go to Facebook Login β†’ Settings</li>
<li class="">Valid OAuth Redirect URIs:<!-- -->
<ul>
<li class=""><code>http://localhost:8000/auth/callback/facebook</code></li>
<li class=""><code>https://www.communityone.com/api/auth/callback/facebook</code></li>
</ul>
</li>
<li class="">Client OAuth Login: <strong>Yes</strong></li>
<li class="">Web OAuth Login: <strong>Yes</strong></li>
</ul>
</li>
<li class="">
<p><strong>Get App ID and Secret</strong></p>
<ul>
<li class="">Go to Settings β†’ Basic</li>
<li class="">Copy <strong>App ID</strong> and <strong>App Secret</strong></li>
</ul>
</li>
</ol>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=add-to-env-2>Add to <code>.env</code>:<a href=#add-to-env-2 class=hash-link aria-label="Direct link to add-to-env-2" title="Direct link to add-to-env-2" translate=no>​</a></h4>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style=--prism-color:#393A34;--prism-background-color:#f6f8fa><div class=codeBlockContent_QJqH><pre tabindex=0 class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style=color:#393A34;background-color:#f6f8fa><code class=codeBlockLines_e6Vv><div class=token-line style=color:#393A34><span class="token plain">FACEBOOK_APP_ID=1234567890123456</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">FACEBOOK_APP_SECRET=xxxxxxxxxxxxx</span><br/></div></code></pre></div></div>
<hr/>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=4-github-oauth>4. GitHub OAuth<a href=#4-github-oauth class=hash-link aria-label="Direct link to 4. GitHub OAuth" title="Direct link to 4. GitHub OAuth" translate=no>​</a></h3>
<p><strong>Get credentials:</strong> <a href=https://github.com/settings/developers target=_blank rel="noopener noreferrer" class="">github.com/settings/developers</a></p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=steps-3>Steps:<a href=#steps-3 class=hash-link aria-label="Direct link to Steps:" title="Direct link to Steps:" translate=no>​</a></h4>
<ol>
<li class="">
<p><strong>Register new OAuth application</strong></p>
<ul>
<li class="">Go to Settings β†’ Developer settings β†’ OAuth Apps</li>
<li class="">Click <strong>"New OAuth App"</strong></li>
</ul>
</li>
<li class="">
<p><strong>Fill in details</strong></p>
<ul>
<li class=""><strong>Application name</strong>: <code>Open Navigator</code></li>
<li class=""><strong>Homepage URL</strong>: <code>https://www.communityone.com</code></li>
<li class=""><strong>Authorization callback URL</strong>:<!-- -->
<ul>
<li class="">Development: <code>http://localhost:8000/auth/callback/github</code></li>
<li class="">Production: <code>https://www.communityone.com/api/auth/callback/github</code></li>
</ul>
</li>
</ul>
</li>
<li class="">
<p><strong>Create application</strong></p>
<ul>
<li class="">Click <strong>"Register application"</strong></li>
<li class="">Copy <strong>Client ID</strong></li>
<li class="">Generate <strong>Client Secret</strong> and copy it</li>
</ul>
</li>
</ol>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id=add-to-env-3>Add to <code>.env</code>:<a href=#add-to-env-3 class=hash-link aria-label="Direct link to add-to-env-3" title="Direct link to add-to-env-3" translate=no>​</a></h4>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style=--prism-color:#393A34;--prism-background-color:#f6f8fa><div class=codeBlockContent_QJqH><pre tabindex=0 class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style=color:#393A34;background-color:#f6f8fa><code class=codeBlockLines_e6Vv><div class=token-line style=color:#393A34><span class="token plain">GITHUB_CLIENT_ID=Iv1.xxxxxxxxxxxxx</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">GITHUB_CLIENT_SECRET=xxxxxxxxxxxxx</span><br/></div></code></pre></div></div>
<hr/>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=-generate-jwt-secret>πŸ”‘ Generate JWT Secret<a href=#-generate-jwt-secret class=hash-link aria-label="Direct link to πŸ”‘ Generate JWT Secret" title="Direct link to πŸ”‘ Generate JWT Secret" translate=no>​</a></h2>
<p>Create a secure random secret for JWT tokens:</p>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style=--prism-color:#393A34;--prism-background-color:#f6f8fa><div class=codeBlockContent_QJqH><pre tabindex=0 class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style=color:#393A34;background-color:#f6f8fa><code class=codeBlockLines_e6Vv><div class=token-line style=color:#393A34><span class="token plain"># Generate 32-byte random secret</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">openssl rand -hex 32</span><br/></div><div class=token-line style=color:#393A34><span class="token plain" style=display:inline-block></span><br/></div><div class=token-line style=color:#393A34><span class="token plain"># Or use Python</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">python -c "import secrets; print(secrets.token_urlsafe(32))"</span><br/></div></code></pre></div></div>
<p>Add to <code>.env</code>:</p>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style=--prism-color:#393A34;--prism-background-color:#f6f8fa><div class=codeBlockContent_QJqH><pre tabindex=0 class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style=color:#393A34;background-color:#f6f8fa><code class=codeBlockLines_e6Vv><div class=token-line style=color:#393A34><span class="token plain">JWT_SECRET_KEY=your_random_32_char_secret_here</span><br/></div></code></pre></div></div>
<hr/>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=-environment-configuration>🌐 Environment Configuration<a href=#-environment-configuration class=hash-link aria-label="Direct link to 🌐 Environment Configuration" title="Direct link to 🌐 Environment Configuration" translate=no>​</a></h2>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=development-env>Development <code>.env</code>:<a href=#development-env class=hash-link aria-label="Direct link to development-env" title="Direct link to development-env" translate=no>​</a></h3>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style=--prism-color:#393A34;--prism-background-color:#f6f8fa><div class=codeBlockContent_QJqH><pre tabindex=0 class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style=color:#393A34;background-color:#f6f8fa><code class=codeBlockLines_e6Vv><div class=token-line style=color:#393A34><span class="token plain"># Database</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">DATABASE_URL=postgresql://user:password@ep-xxx.us-east-2.aws.neon.tech/neondb?sslmode=require</span><br/></div><div class=token-line style=color:#393A34><span class="token plain" style=display:inline-block></span><br/></div><div class=token-line style=color:#393A34><span class="token plain"># JWT</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">JWT_SECRET_KEY=your_random_secret_key</span><br/></div><div class=token-line style=color:#393A34><span class="token plain" style=display:inline-block></span><br/></div><div class=token-line style=color:#393A34><span class="token plain"># Frontend URL</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">FRONTEND_URL=http://localhost:5173</span><br/></div><div class=token-line style=color:#393A34><span class="token plain" style=display:inline-block></span><br/></div><div class=token-line style=color:#393A34><span class="token plain"># OAuth (all providers)</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">HUGGINGFACE_CLIENT_ID=hf_oauth_xxx</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">HUGGINGFACE_CLIENT_SECRET=hf_oauth_secret_xxx</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">GOOGLE_CLIENT_ID=123456789-xxx.apps.googleusercontent.com</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">GOOGLE_CLIENT_SECRET=GOCSPX-xxx</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">FACEBOOK_APP_ID=123456789</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">FACEBOOK_APP_SECRET=xxx</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">GITHUB_CLIENT_ID=Iv1.xxx</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">GITHUB_CLIENT_SECRET=xxx</span><br/></div></code></pre></div></div>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=production-huggingface-spaces>Production (HuggingFace Spaces)<a href=#production-huggingface-spaces class=hash-link aria-label="Direct link to Production (HuggingFace Spaces)" title="Direct link to Production (HuggingFace Spaces)" translate=no>​</a></h3>
<p>Add secrets in <strong>Space Settings β†’ Repository secrets</strong>:</p>
<table><thead><tr><th>Secret Name<th>Value<tbody><tr><td><code>DATABASE_URL</code><td><code>postgresql://...neon.tech/...</code><tr><td><code>JWT_SECRET_KEY</code><td>Your random secret<tr><td><code>FRONTEND_URL</code><td><code>https://www.communityone.com</code><tr><td><code>HUGGINGFACE_CLIENT_ID</code><td>From HF OAuth app<tr><td><code>HUGGINGFACE_CLIENT_SECRET</code><td>From HF OAuth app<tr><td><code>GOOGLE_CLIENT_ID</code><td>From Google Cloud<tr><td><code>GOOGLE_CLIENT_SECRET</code><td>From Google Cloud<tr><td><code>FACEBOOK_APP_ID</code><td>From Facebook app<tr><td><code>FACEBOOK_APP_SECRET</code><td>From Facebook app<tr><td><code>GITHUB_CLIENT_ID</code><td>From GitHub OAuth app<tr><td><code>GITHUB_CLIENT_SECRET</code><td>From GitHub OAuth app</table>
<hr/>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=-testing-authentication>πŸ§ͺ Testing Authentication<a href=#-testing-authentication class=hash-link aria-label="Direct link to πŸ§ͺ Testing Authentication" title="Direct link to πŸ§ͺ Testing Authentication" translate=no>​</a></h2>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=1-start-the-api-server>1. Start the API server<a href=#1-start-the-api-server class=hash-link aria-label="Direct link to 1. Start the API server" title="Direct link to 1. Start the API server" translate=no>​</a></h3>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style=--prism-color:#393A34;--prism-background-color:#f6f8fa><div class=codeBlockContent_QJqH><pre tabindex=0 class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style=color:#393A34;background-color:#f6f8fa><code class=codeBlockLines_e6Vv><div class=token-line style=color:#393A34><span class="token plain">source .venv/bin/activate</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">python main.py serve</span><br/></div></code></pre></div></div>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=2-start-the-frontend>2. Start the frontend<a href=#2-start-the-frontend class=hash-link aria-label="Direct link to 2. Start the frontend" title="Direct link to 2. Start the frontend" translate=no>​</a></h3>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style=--prism-color:#393A34;--prism-background-color:#f6f8fa><div class=codeBlockContent_QJqH><pre tabindex=0 class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style=color:#393A34;background-color:#f6f8fa><code class=codeBlockLines_e6Vv><div class=token-line style=color:#393A34><span class="token plain">cd frontend</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">npm run dev</span><br/></div></code></pre></div></div>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=3-test-oauth-flows>3. Test OAuth flows<a href=#3-test-oauth-flows class=hash-link aria-label="Direct link to 3. Test OAuth flows" title="Direct link to 3. Test OAuth flows" translate=no>​</a></h3>
<ol>
<li class="">Visit <code>http://localhost:5173</code></li>
<li class="">Click <strong>"Login"</strong> in top-right</li>
<li class="">Select a provider (HuggingFace, Google, Facebook, or GitHub)</li>
<li class="">Complete OAuth flow</li>
<li class="">You should be redirected back with your profile visible</li>
</ol>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=4-verify-database>4. Verify database<a href=#4-verify-database class=hash-link aria-label="Direct link to 4. Verify database" title="Direct link to 4. Verify database" translate=no>​</a></h3>
<p>Check that user was created in Neon:</p>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style=--prism-color:#393A34;--prism-background-color:#f6f8fa><div class=codeBlockContent_QJqH><pre tabindex=0 class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style=color:#393A34;background-color:#f6f8fa><code class=codeBlockLines_e6Vv><div class=token-line style=color:#393A34><span class="token plain"># Option 1: Neon SQL Editor (in dashboard)</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">SELECT * FROM users;</span><br/></div><div class=token-line style=color:#393A34><span class="token plain" style=display:inline-block></span><br/></div><div class=token-line style=color:#393A34><span class="token plain"># Option 2: psql client</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">psql "postgresql://user:password@ep-xxx.neon.tech/neondb?sslmode=require"</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">\dt  # List tables</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">SELECT * FROM users;</span><br/></div></code></pre></div></div>
<hr/>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=-database-schema>πŸ“Š Database Schema<a href=#-database-schema class=hash-link aria-label="Direct link to πŸ“Š Database Schema" title="Direct link to πŸ“Š Database Schema" translate=no>​</a></h2>
<p>The authentication system creates these tables automatically:</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=users-table><code>users</code> table<a href=#users-table class=hash-link aria-label="Direct link to users-table" title="Direct link to users-table" translate=no>​</a></h3>
<table><thead><tr><th>Column<th>Type<th>Description<tbody><tr><td><code>id</code><td>Integer<td>Primary key<tr><td><code>email</code><td>String(255)<td>User email (unique)<tr><td><code>username</code><td>String(100)<td>Optional username<tr><td><code>full_name</code><td>String(255)<td>Display name<tr><td><code>avatar_url</code><td>String(500)<td>Profile picture URL<tr><td><code>oauth_provider</code><td>String(50)<td><code>huggingface</code>, <code>google</code>, <code>facebook</code>, <code>github</code><tr><td><code>oauth_id</code><td>String(255)<td>Provider's user ID<tr><td><code>hashed_password</code><td>String(255)<td>For email/password (optional)<tr><td><code>is_active</code><td>Boolean<td>Account status<tr><td><code>is_verified</code><td>Boolean<td>Email verification status<tr><td><code>created_at</code><td>DateTime<td>Account creation<tr><td><code>updated_at</code><td>DateTime<td>Last update<tr><td><code>last_login</code><td>DateTime<td>Last login timestamp<tr><td><code>preferences</code><td>Text<td>User settings (JSON)</table>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=oauth_states-table><code>oauth_states</code> table<a href=#oauth_states-table class=hash-link aria-label="Direct link to oauth_states-table" title="Direct link to oauth_states-table" translate=no>​</a></h3>
<table><thead><tr><th>Column<th>Type<th>Description<tbody><tr><td><code>id</code><td>Integer<td>Primary key<tr><td><code>state_token</code><td>String(255)<td>CSRF protection token<tr><td><code>provider</code><td>String(50)<td>OAuth provider name<tr><td><code>redirect_uri</code><td>String(500)<td>Callback URL<tr><td><code>created_at</code><td>DateTime<td>Creation timestamp<tr><td><code>expires_at</code><td>DateTime<td>Expiration (10 minutes)</table>
<hr/>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=-security-best-practices>πŸ”’ Security Best Practices<a href=#-security-best-practices class=hash-link aria-label="Direct link to πŸ”’ Security Best Practices" title="Direct link to πŸ”’ Security Best Practices" translate=no>​</a></h2>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=-do>βœ… DO:<a href=#-do class=hash-link aria-label="Direct link to βœ… DO:" title="Direct link to βœ… DO:" translate=no>​</a></h3>
<ul>
<li class="">Use HTTPS in production</li>
<li class="">Rotate JWT secrets regularly</li>
<li class="">Keep OAuth secrets in environment variables (never commit to git)</li>
<li class="">Use Neon's connection pooling</li>
<li class="">Enable Neon's IP allowlist for production</li>
</ul>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=-dont>❌ DON'T:<a href=#-dont class=hash-link aria-label="Direct link to ❌ DON'T:" title="Direct link to ❌ DON'T:" translate=no>​</a></h3>
<ul>
<li class="">Commit <code>.env</code> file to git (it's in <code>.gitignore</code>)</li>
<li class="">Share OAuth secrets publicly</li>
<li class="">Use weak JWT secrets</li>
<li class="">Disable SSL mode on Neon connections</li>
</ul>
<hr/>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=-production-deployment>πŸš€ Production Deployment<a href=#-production-deployment class=hash-link aria-label="Direct link to πŸš€ Production Deployment" title="Direct link to πŸš€ Production Deployment" translate=no>​</a></h2>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=huggingface-spaces>HuggingFace Spaces<a href=#huggingface-spaces class=hash-link aria-label="Direct link to HuggingFace Spaces" title="Direct link to HuggingFace Spaces" translate=no>​</a></h3>
<p>All environment variables are automatically loaded from <strong>Repository secrets</strong>.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=update-oauth-redirect-uris>Update OAuth redirect URIs<a href=#update-oauth-redirect-uris class=hash-link aria-label="Direct link to Update OAuth redirect URIs" title="Direct link to Update OAuth redirect URIs" translate=no>​</a></h3>
<p>After deploying, update all OAuth apps with production callback URLs:</p>
<ul>
<li class="">HuggingFace: <code>https://www.communityone.com/api/auth/callback/huggingface</code></li>
<li class="">Google: <code>https://www.communityone.com/api/auth/callback/google</code></li>
<li class="">Facebook: <code>https://www.communityone.com/api/auth/callback/facebook</code></li>
<li class="">GitHub: <code>https://www.communityone.com/api/auth/callback/github</code></li>
</ul>
<hr/>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=-troubleshooting>πŸ› Troubleshooting<a href=#-troubleshooting class=hash-link aria-label="Direct link to πŸ› Troubleshooting" title="Direct link to πŸ› Troubleshooting" translate=no>​</a></h2>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=database-connection-fails>Database connection fails<a href=#database-connection-fails class=hash-link aria-label="Direct link to Database connection fails" title="Direct link to Database connection fails" translate=no>​</a></h3>
<div class="language-text codeBlockContainer_Ckt0 theme-code-block" style=--prism-color:#393A34;--prism-background-color:#f6f8fa><div class=codeBlockContent_QJqH><pre tabindex=0 class="prism-code language-text codeBlock_bY9V thin-scrollbar" style=color:#393A34;background-color:#f6f8fa><code class=codeBlockLines_e6Vv><div class=token-line style=color:#393A34><span class="token plain">❌ could not connect to server</span><br/></div></code></pre></div></div>
<p><strong>Fix:</strong></p>
<ul>
<li class="">Verify <code>DATABASE_URL</code> is correct</li>
<li class="">Check Neon project is not suspended (free tier auto-suspends after inactivity)</li>
<li class="">Ensure <code>?sslmode=require</code> is in connection string</li>
</ul>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=oauth-redirect-mismatch>OAuth redirect mismatch<a href=#oauth-redirect-mismatch class=hash-link aria-label="Direct link to OAuth redirect mismatch" title="Direct link to OAuth redirect mismatch" translate=no>​</a></h3>
<div class="language-text codeBlockContainer_Ckt0 theme-code-block" style=--prism-color:#393A34;--prism-background-color:#f6f8fa><div class=codeBlockContent_QJqH><pre tabindex=0 class="prism-code language-text codeBlock_bY9V thin-scrollbar" style=color:#393A34;background-color:#f6f8fa><code class=codeBlockLines_e6Vv><div class=token-line style=color:#393A34><span class="token plain">❌ redirect_uri_mismatch</span><br/></div></code></pre></div></div>
<p><strong>Fix:</strong></p>
<ul>
<li class="">Check redirect URI in OAuth app settings matches your server</li>
<li class="">Ensure <code>http://</code> vs <code>https://</code> matches</li>
<li class="">Verify port number (<code>:8000</code> for API)</li>
</ul>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=jwt-token-invalid>JWT token invalid<a href=#jwt-token-invalid class=hash-link aria-label="Direct link to JWT token invalid" title="Direct link to JWT token invalid" translate=no>​</a></h3>
<div class="language-text codeBlockContainer_Ckt0 theme-code-block" style=--prism-color:#393A34;--prism-background-color:#f6f8fa><div class=codeBlockContent_QJqH><pre tabindex=0 class="prism-code language-text codeBlock_bY9V thin-scrollbar" style=color:#393A34;background-color:#f6f8fa><code class=codeBlockLines_e6Vv><div class=token-line style=color:#393A34><span class="token plain">❌ Could not validate credentials</span><br/></div></code></pre></div></div>
<p><strong>Fix:</strong></p>
<ul>
<li class="">Ensure <code>JWT_SECRET_KEY</code> is set and matches between sessions</li>
<li class="">Check token hasn't expired (7-day default)</li>
<li class="">Clear browser localStorage and re-login</li>
</ul>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id=tables-not-created>Tables not created<a href=#tables-not-created class=hash-link aria-label="Direct link to Tables not created" title="Direct link to Tables not created" translate=no>​</a></h3>
<div class="language-text codeBlockContainer_Ckt0 theme-code-block" style=--prism-color:#393A34;--prism-background-color:#f6f8fa><div class=codeBlockContent_QJqH><pre tabindex=0 class="prism-code language-text codeBlock_bY9V thin-scrollbar" style=color:#393A34;background-color:#f6f8fa><code class=codeBlockLines_e6Vv><div class=token-line style=color:#393A34><span class="token plain">❌ relation "users" does not exist</span><br/></div></code></pre></div></div>
<p><strong>Fix:</strong></p>
<ul>
<li class="">Restart API server to trigger <code>init_db()</code></li>
<li class="">Check database connection is successful</li>
<li class="">Manually run: <code>from api.database import init_db; init_db()</code></li>
</ul>
<hr/>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=-additional-resources>πŸ“š Additional Resources<a href=#-additional-resources class=hash-link aria-label="Direct link to πŸ“š Additional Resources" title="Direct link to πŸ“š Additional Resources" translate=no>​</a></h2>
<ul>
<li class=""><a href=https://neon.tech/docs target=_blank rel="noopener noreferrer" class="">Neon Documentation</a></li>
<li class=""><a href=https://datatracker.ietf.org/doc/html/rfc6749 target=_blank rel="noopener noreferrer" class="">OAuth 2.0 RFC</a></li>
<li class=""><a href=https://datatracker.ietf.org/doc/html/rfc8725 target=_blank rel="noopener noreferrer" class="">JWT Best Practices</a></li>
<li class=""><a href=https://fastapi.tiangolo.com/tutorial/security/ target=_blank rel="noopener noreferrer" class="">FastAPI Security</a></li>
</ul>
<hr/>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=-checklist>βœ… Checklist<a href=#-checklist class=hash-link aria-label="Direct link to βœ… Checklist" title="Direct link to βœ… Checklist" translate=no>​</a></h2>
<p>Before going live, ensure:</p>
<ul class="contains-task-list containsTaskList_mC6p">
<li class=task-list-item><input type=checkbox disabled/> <!-- -->Neon database created and connected</li>
<li class=task-list-item><input type=checkbox disabled/> <!-- -->All 4 OAuth apps configured with production redirect URIs</li>
<li class=task-list-item><input type=checkbox disabled/> <!-- -->JWT secret generated (32+ characters)</li>
<li class=task-list-item><input type=checkbox disabled/> <!-- -->Environment variables added to HuggingFace Spaces secrets</li>
<li class=task-list-item><input type=checkbox disabled/> <!-- -->Database tables created (<code>users</code>, <code>oauth_states</code>)</li>
<li class=task-list-item><input type=checkbox disabled/> <!-- -->OAuth flows tested with all 4 providers</li>
<li class=task-list-item><input type=checkbox disabled/> <!-- -->HTTPS enabled on custom domain</li>
<li class=task-list-item><input type=checkbox disabled/> <!-- -->Neon IP allowlist configured (optional, for extra security)</li>
</ul>
<hr/>
<p><strong>Need help?</strong> Open an issue on <a href=https://github.com/getcommunityone/open-navigator-for-engagement/issues target=_blank rel="noopener noreferrer" class="">GitHub</a></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="row margin-top--sm theme-doc-footer-edit-meta-row"><div class="col noPrint_WFHX"><a href=https://github.com/getcommunityone/open-navigator-for-engagement/tree/main/website/docs/deployment/authentication-setup.md target=_blank rel="noopener noreferrer" class=theme-edit-this-page><svg fill=currentColor height=20 width=20 viewBox="0 0 40 40" class=iconEdit_Z9Sw aria-hidden=true><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"/></g></svg>Edit this page</a></div><div class="col lastUpdated_JAkA"></div></div></footer></article><nav class="docusaurus-mt-lg pagination-nav" aria-label="Docs pages"><a class="pagination-nav__link pagination-nav__link--prev" href=/docs/deployment/oauth-providers-setup><div class=pagination-nav__sublabel>Previous</div><div class=pagination-nav__label>OAuth Providers Setup</div></a><a class="pagination-nav__link pagination-nav__link--next" href=/docs/deployment/schema-migration><div class=pagination-nav__sublabel>Next</div><div class=pagination-nav__label>Schema Migration Guide</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href=#-database-setup-neon-serverless-postgresql class="table-of-contents__link toc-highlight">πŸ₯‡ Database Setup: Neon (Serverless PostgreSQL)</a><ul><li><a href=#why-neon class="table-of-contents__link toc-highlight">Why Neon?</a><li><a href=#setup-steps class="table-of-contents__link toc-highlight">Setup Steps</a><li><a href=#verify-connection class="table-of-contents__link toc-highlight">Verify Connection</a></ul><li><a href=#-oauth-provider-setup class="table-of-contents__link toc-highlight">πŸ” OAuth Provider Setup</a><ul><li><a href=#1-huggingface-oauth class="table-of-contents__link toc-highlight">1. HuggingFace OAuth</a><ul><li><a href=#steps class="table-of-contents__link toc-highlight">Steps:</a><li><a href=#add-to-env class="table-of-contents__link toc-highlight">Add to <code>.env</code>:</a></ul><li><a href=#2-google-oauth class="table-of-contents__link toc-highlight">2. Google OAuth</a><ul><li><a href=#steps-1 class="table-of-contents__link toc-highlight">Steps:</a><li><a href=#add-to-env-1 class="table-of-contents__link toc-highlight">Add to <code>.env</code>:</a></ul><li><a href=#3-facebook-oauth class="table-of-contents__link toc-highlight">3. Facebook OAuth</a><ul><li><a href=#steps-2 class="table-of-contents__link toc-highlight">Steps:</a><li><a href=#add-to-env-2 class="table-of-contents__link toc-highlight">Add to <code>.env</code>:</a></ul><li><a href=#4-github-oauth class="table-of-contents__link toc-highlight">4. GitHub OAuth</a><ul><li><a href=#steps-3 class="table-of-contents__link toc-highlight">Steps:</a><li><a href=#add-to-env-3 class="table-of-contents__link toc-highlight">Add to <code>.env</code>:</a></ul></ul><li><a href=#-generate-jwt-secret class="table-of-contents__link toc-highlight">πŸ”‘ Generate JWT Secret</a><li><a href=#-environment-configuration class="table-of-contents__link toc-highlight">🌐 Environment Configuration</a><ul><li><a href=#development-env class="table-of-contents__link toc-highlight">Development <code>.env</code>:</a><li><a href=#production-huggingface-spaces class="table-of-contents__link toc-highlight">Production (HuggingFace Spaces)</a></ul><li><a href=#-testing-authentication class="table-of-contents__link toc-highlight">πŸ§ͺ Testing Authentication</a><ul><li><a href=#1-start-the-api-server class="table-of-contents__link toc-highlight">1. Start the API server</a><li><a href=#2-start-the-frontend class="table-of-contents__link toc-highlight">2. Start the frontend</a><li><a href=#3-test-oauth-flows class="table-of-contents__link toc-highlight">3. Test OAuth flows</a><li><a href=#4-verify-database class="table-of-contents__link toc-highlight">4. Verify database</a></ul><li><a href=#-database-schema class="table-of-contents__link toc-highlight">πŸ“Š Database Schema</a><ul><li><a href=#users-table class="table-of-contents__link toc-highlight"><code>users</code> table</a><li><a href=#oauth_states-table class="table-of-contents__link toc-highlight"><code>oauth_states</code> table</a></ul><li><a href=#-security-best-practices class="table-of-contents__link toc-highlight">πŸ”’ Security Best Practices</a><ul><li><a href=#-do class="table-of-contents__link toc-highlight">βœ… DO:</a><li><a href=#-dont class="table-of-contents__link toc-highlight">❌ DON'T:</a></ul><li><a href=#-production-deployment class="table-of-contents__link toc-highlight">πŸš€ Production Deployment</a><ul><li><a href=#huggingface-spaces class="table-of-contents__link toc-highlight">HuggingFace Spaces</a><li><a href=#update-oauth-redirect-uris class="table-of-contents__link toc-highlight">Update OAuth redirect URIs</a></ul><li><a href=#-troubleshooting class="table-of-contents__link toc-highlight">πŸ› Troubleshooting</a><ul><li><a href=#database-connection-fails class="table-of-contents__link toc-highlight">Database connection fails</a><li><a href=#oauth-redirect-mismatch class="table-of-contents__link toc-highlight">OAuth redirect mismatch</a><li><a href=#jwt-token-invalid class="table-of-contents__link toc-highlight">JWT token invalid</a><li><a href=#tables-not-created class="table-of-contents__link toc-highlight">Tables not created</a></ul><li><a href=#-additional-resources class="table-of-contents__link toc-highlight">πŸ“š Additional Resources</a><li><a href=#-checklist class="table-of-contents__link toc-highlight">βœ… Checklist</a></ul></div></div></div></div></main></div></div></div><footer class="theme-layout-footer footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="theme-layout-footer-column col footer__col"><div class=footer__title>Documentation</div><ul class="footer__items clean-list"><li class=footer__item><a class=footer__link-item href=/docs/intro>Getting Started</a><li class=footer__item><a class=footer__link-item href=/docs/data-sources/citations>Citations & Data Sources</a><li class=footer__item><a class=footer__link-item href=/docs/data-sources/overview>Data Sources</a><li class=footer__item><a class=footer__link-item href=/docs/for-developers>For Developers</a></ul></div><div class="theme-layout-footer-column col footer__col"><div class=footer__title>Resources</div><ul class="footer__items clean-list"><li class=footer__item><a href=https://www.communityone.com target=_blank rel="noopener noreferrer" class=footer__link-item>Launch Open Navigator<svg width=13.5 height=13.5 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a><li class=footer__item><a href=https://github.com/getcommunityone/open-navigator-for-engagement target=_blank rel="noopener noreferrer" class=footer__link-item>GitHub<svg width=13.5 height=13.5 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a><li class=footer__item><a href=https://www.groundvue.org/ target=_blank rel="noopener noreferrer" class=footer__link-item>GroundVue (Partner)<svg width=13.5 height=13.5 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a></ul></div><div class="theme-layout-footer-column col footer__col"><div class=footer__title>Community</div><ul class="footer__items clean-list"><li class=footer__item><a href=https://www.instagram.com/getcommunityone/ target=_blank rel="noopener noreferrer" class=footer__link-item>Instagram<svg width=13.5 height=13.5 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a><li class=footer__item><a href=https://www.facebook.com/getcommunityone target=_blank rel="noopener noreferrer" class=footer__link-item>Facebook<svg width=13.5 height=13.5 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a><li class=footer__item><a href=https://x.com/getcommunityone/ target=_blank rel="noopener noreferrer" class=footer__link-item>X (Twitter)<svg width=13.5 height=13.5 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a><li class=footer__item><a href=https://www.linkedin.com/company/getcommunityone target=_blank rel="noopener noreferrer" class=footer__link-item>LinkedIn<svg width=13.5 height=13.5 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a><li class=footer__item><a href=https://www.youtube.com/@getcommunityone target=_blank rel="noopener noreferrer" class=footer__link-item>YouTube<svg width=13.5 height=13.5 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a><li class=footer__item><a href=https://discord.gg/uH6Dytek target=_blank rel="noopener noreferrer" class=footer__link-item>Discord<svg width=13.5 height=13.5 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a></ul></div><div class="theme-layout-footer-column col footer__col"><div class=footer__title>Legal</div><ul class="footer__items clean-list"><li class=footer__item><a class=footer__link-item href=/docs/legal/privacy-policy>Privacy Policy</a><li class=footer__item><a class=footer__link-item href=/docs/legal/terms-of-service>Terms of Service</a><li class=footer__item><a class=footer__link-item href=/docs/legal/data-provider-terms>Data Provider Terms</a></ul></div><div class="theme-layout-footer-column col footer__col"><div class=footer__title>More</div><ul class="footer__items clean-list"><li class=footer__item><a class=footer__link-item href=/blog>Blog</a><li class=footer__item><a href=https://github.com/getcommunityone/open-navigator-for-engagement/blob/main/LICENSE target=_blank rel="noopener noreferrer" class=footer__link-item>License (MIT)<svg width=13.5 height=13.5 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a></ul></div></div><div class="footer__bottom text--center"><div class=footer__copyright>Copyright Β© 2026 Community One. Built with Docusaurus.</div></div></div></footer></div></body>