PlanOpticon

1
2
<!doctype html>
3
<html lang="en" class="no-js">
4
<head>
5
6
<meta charset="utf-8">
7
<meta name="viewport" content="width=device-width,initial-scale=1">
8
9
<meta name="description" content="AI-powered video analysis and knowledge extraction">
10
11
12
<meta name="author" content="CONFLICT LLC">
13
14
15
<link rel="canonical" href="https://planopticon.dev/guide/authentication/">
16
17
18
<link rel="prev" href="../planning-agent/">
19
20
21
<link rel="next" href="../export/">
22
23
24
25
26
27
<link rel="icon" href="../../assets/images/favicon.png">
28
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.7.4">
29
30
31
32
<title>Authentication - PlanOpticon</title>
33
34
35
36
<link rel="stylesheet" href="../../assets/stylesheets/main.484c7ddc.min.css">
37
38
39
<link rel="stylesheet" href="../../assets/stylesheets/palette.ab4e12ef.min.css">
40
41
42
43
44
45
46
47
48
49
50
51
52
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
53
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
54
<style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
55
56
57
58
<link rel="stylesheet" href="../../assets/_mkdocstrings.css">
59
60
<link rel="stylesheet" href="../../assets/css/custom.css">
61
62
<script>__md_scope=new URL("../..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
63
64
65
66
67
68
</head>
69
70
71
72
73
74
75
76
77
78
<body dir="ltr" data-md-color-scheme="slate" data-md-color-primary="custom" data-md-color-accent="custom">
79
80
81
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
82
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
83
<label class="md-overlay" for="__drawer"></label>
84
<div data-md-component="skip">
85
86
87
<a href="#authentication" class="md-skip">
88
Skip to content
89
</a>
90
91
</div>
92
<div data-md-component="announce">
93
94
</div>
95
96
97
98
99
<header class="md-header" data-md-component="header">
100
<nav class="md-header__inner md-grid" aria-label="Header">
101
<a href="../.." title="PlanOpticon" class="md-header__button md-logo" aria-label="PlanOpticon" data-md-component="logo">
102
103
<img src="../../assets/images/conflict-logo.svg" alt="logo">
104
105
</a>
106
<label class="md-header__button md-icon" for="__drawer">
107
108
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg>
109
</label>
110
<div class="md-header__title" data-md-component="header-title">
111
<div class="md-header__ellipsis">
112
<div class="md-header__topic">
113
<span class="md-ellipsis">
114
PlanOpticon
115
</span>
116
</div>
117
<div class="md-header__topic" data-md-component="header-topic">
118
<span class="md-ellipsis">
119
120
Authentication
121
122
</span>
123
</div>
124
</div>
125
</div>
126
127
128
<form class="md-header__option" data-md-component="palette">
129
130
131
132
133
<input class="md-option" data-md-color-media="(prefers-color-scheme: dark)" data-md-color-scheme="slate" data-md-color-primary="custom" data-md-color-accent="custom" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_0">
134
135
<label class="md-header__button md-icon" title="Switch to light mode" for="__palette_1" hidden>
136
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6a6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg>
137
</label>
138
139
140
141
142
143
<input class="md-option" data-md-color-media="(prefers-color-scheme: light)" data-md-color-scheme="default" data-md-color-primary="custom" data-md-color-accent="custom" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_1">
144
145
<label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_0" hidden>
146
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-4m0 10a6 6 0 0 1-6-6 6 6 0 0 1 6-6 6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg>
147
</label>
148
149
150
</form>
151
152
153
154
<script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
155
156
157
158
159
160
<label class="md-header__button md-icon" for="__search">
161
162
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
163
</label>
164
<div class="md-search" data-md-component="search" role="dialog">
165
<label class="md-search__overlay" for="__search"></label>
166
<div class="md-search__inner" role="search">
167
<form class="md-search__form" name="search">
168
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
169
<label class="md-search__icon md-icon" for="__search">
170
171
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
172
173
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
174
</label>
175
<nav class="md-search__options" aria-label="Search">
176
177
<button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
178
179
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
180
</button>
181
</nav>
182
183
<div class="md-search__suggest" data-md-component="search-suggest"></div>
184
185
</form>
186
<div class="md-search__output">
187
<div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
188
<div class="md-search-result" data-md-component="search-result">
189
<div class="md-search-result__meta">
190
Initializing search
191
</div>
192
<ol class="md-search-result__list" role="presentation"></ol>
193
</div>
194
</div>
195
</div>
196
</div>
197
</div>
198
199
200
201
<div class="md-header__source">
202
<a href="https://github.com/ConflictHQ/PlanOpticon" title="Go to repository" class="md-source" data-md-component="source">
203
<div class="md-source__icon md-icon">
204
205
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M173.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M252.8 8C114.1 8 8 113.3 8 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C436.2 457.8 504 362.9 504 252 504 113.3 391.5 8 252.8 8M105.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1m-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7m32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2"/></svg>
206
</div>
207
<div class="md-source__repository">
208
ConflictHQ/PlanOpticon
209
</div>
210
</a>
211
</div>
212
213
</nav>
214
215
</header>
216
217
<div class="md-container" data-md-component="container">
218
219
220
221
222
223
<nav class="md-tabs" aria-label="Tabs" data-md-component="tabs">
224
<div class="md-grid">
225
<ul class="md-tabs__list">
226
227
228
229
230
231
232
<li class="md-tabs__item">
233
<a href="../.." class="md-tabs__link">
234
235
236
237
238
239
Home
240
241
</a>
242
</li>
243
244
245
246
247
248
249
250
251
252
253
<li class="md-tabs__item">
254
<a href="../../getting-started/installation/" class="md-tabs__link">
255
256
257
258
Getting Started
259
260
</a>
261
</li>
262
263
264
265
266
267
268
269
270
271
272
273
274
275
<li class="md-tabs__item md-tabs__item--active">
276
<a href="../single-video/" class="md-tabs__link">
277
278
279
280
User Guide
281
282
</a>
283
</li>
284
285
286
287
288
289
290
291
292
293
<li class="md-tabs__item">
294
<a href="../../use-cases/" class="md-tabs__link">
295
296
297
298
299
300
Use Cases
301
302
</a>
303
</li>
304
305
306
307
308
309
310
311
312
<li class="md-tabs__item">
313
<a href="../../cli-reference/" class="md-tabs__link">
314
315
316
317
318
319
CLI Reference
320
321
</a>
322
</li>
323
324
325
326
327
328
329
330
331
332
333
<li class="md-tabs__item">
334
<a href="../../architecture/overview/" class="md-tabs__link">
335
336
337
338
Architecture
339
340
</a>
341
</li>
342
343
344
345
346
347
348
349
350
351
352
353
<li class="md-tabs__item">
354
<a href="../../api/models/" class="md-tabs__link">
355
356
357
358
API Reference
359
360
</a>
361
</li>
362
363
364
365
366
367
368
369
370
371
<li class="md-tabs__item">
372
<a href="../../faq/" class="md-tabs__link">
373
374
375
376
377
378
FAQ & Troubleshooting
379
380
</a>
381
</li>
382
383
384
385
386
387
388
389
390
<li class="md-tabs__item">
391
<a href="../../contributing/" class="md-tabs__link">
392
393
394
395
396
397
Contributing
398
399
</a>
400
</li>
401
402
403
404
</ul>
405
</div>
406
</nav>
407
408
409
410
<main class="md-main" data-md-component="main">
411
<div class="md-main__inner md-grid">
412
413
414
415
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
416
<div class="md-sidebar__scrollwrap">
417
<div class="md-sidebar__inner">
418
419
420
421
422
423
424
<nav class="md-nav md-nav--primary md-nav--lifted" aria-label="Navigation" data-md-level="0">
425
<label class="md-nav__title" for="__drawer">
426
<a href="../.." title="PlanOpticon" class="md-nav__button md-logo" aria-label="PlanOpticon" data-md-component="logo">
427
428
<img src="../../assets/images/conflict-logo.svg" alt="logo">
429
430
</a>
431
PlanOpticon
432
</label>
433
434
<div class="md-nav__source">
435
<a href="https://github.com/ConflictHQ/PlanOpticon" title="Go to repository" class="md-source" data-md-component="source">
436
<div class="md-source__icon md-icon">
437
438
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M173.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M252.8 8C114.1 8 8 113.3 8 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C436.2 457.8 504 362.9 504 252 504 113.3 391.5 8 252.8 8M105.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1m-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7m32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2"/></svg>
439
</div>
440
<div class="md-source__repository">
441
ConflictHQ/PlanOpticon
442
</div>
443
</a>
444
</div>
445
446
<ul class="md-nav__list" data-md-scrollfix>
447
448
449
450
451
452
453
454
<li class="md-nav__item">
455
<a href="../.." class="md-nav__link">
456
457
458
459
<span class="md-ellipsis">
460
461
462
Home
463
464
465
466
</span>
467
468
469
470
</a>
471
</li>
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
<li class="md-nav__item md-nav__item--nested">
492
493
494
495
496
497
<input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_2" >
498
499
500
<label class="md-nav__link" for="__nav_2" id="__nav_2_label" tabindex="0">
501
502
503
504
<span class="md-ellipsis">
505
506
507
Getting Started
508
509
510
511
</span>
512
513
514
515
<span class="md-nav__icon md-icon"></span>
516
</label>
517
518
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_2_label" aria-expanded="false">
519
<label class="md-nav__title" for="__nav_2">
520
<span class="md-nav__icon md-icon"></span>
521
522
523
Getting Started
524
525
526
</label>
527
<ul class="md-nav__list" data-md-scrollfix>
528
529
530
531
532
533
534
535
<li class="md-nav__item">
536
<a href="../../getting-started/installation/" class="md-nav__link">
537
538
539
540
<span class="md-ellipsis">
541
542
543
Installation
544
545
546
547
</span>
548
549
550
551
</a>
552
</li>
553
554
555
556
557
558
559
560
561
562
563
<li class="md-nav__item">
564
<a href="../../getting-started/quickstart/" class="md-nav__link">
565
566
567
568
<span class="md-ellipsis">
569
570
571
Quick Start
572
573
574
575
</span>
576
577
578
579
</a>
580
</li>
581
582
583
584
585
586
587
588
589
590
591
<li class="md-nav__item">
592
<a href="../../getting-started/configuration/" class="md-nav__link">
593
594
595
596
<span class="md-ellipsis">
597
598
599
Configuration
600
601
602
603
</span>
604
605
606
607
</a>
608
</li>
609
610
611
612
613
</ul>
614
</nav>
615
616
</li>
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
<li class="md-nav__item md-nav__item--active md-nav__item--section md-nav__item--nested">
642
643
644
645
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" checked>
646
647
648
<label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="">
649
650
651
652
<span class="md-ellipsis">
653
654
655
User Guide
656
657
658
659
</span>
660
661
662
663
<span class="md-nav__icon md-icon"></span>
664
</label>
665
666
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="true">
667
<label class="md-nav__title" for="__nav_3">
668
<span class="md-nav__icon md-icon"></span>
669
670
671
User Guide
672
673
674
</label>
675
<ul class="md-nav__list" data-md-scrollfix>
676
677
678
679
680
681
682
683
<li class="md-nav__item">
684
<a href="../single-video/" class="md-nav__link">
685
686
687
688
<span class="md-ellipsis">
689
690
691
Single Video Analysis
692
693
694
695
</span>
696
697
698
699
</a>
700
</li>
701
702
703
704
705
706
707
708
709
710
711
<li class="md-nav__item">
712
<a href="../batch/" class="md-nav__link">
713
714
715
716
<span class="md-ellipsis">
717
718
719
Batch Processing
720
721
722
723
</span>
724
725
726
727
</a>
728
</li>
729
730
731
732
733
734
735
736
737
738
739
<li class="md-nav__item">
740
<a href="../document-ingestion/" class="md-nav__link">
741
742
743
744
<span class="md-ellipsis">
745
746
747
Document Ingestion
748
749
750
751
</span>
752
753
754
755
</a>
756
</li>
757
758
759
760
761
762
763
764
765
766
767
<li class="md-nav__item">
768
<a href="../cloud-sources/" class="md-nav__link">
769
770
771
772
<span class="md-ellipsis">
773
774
775
Cloud Sources
776
777
778
779
</span>
780
781
782
783
</a>
784
</li>
785
786
787
788
789
790
791
792
793
794
795
<li class="md-nav__item">
796
<a href="../knowledge-graphs/" class="md-nav__link">
797
798
799
800
<span class="md-ellipsis">
801
802
803
Knowledge Graphs
804
805
806
807
</span>
808
809
810
811
</a>
812
</li>
813
814
815
816
817
818
819
820
821
822
823
<li class="md-nav__item">
824
<a href="../companion/" class="md-nav__link">
825
826
827
828
<span class="md-ellipsis">
829
830
831
Interactive Companion
832
833
834
835
</span>
836
837
838
839
</a>
840
</li>
841
842
843
844
845
846
847
848
849
850
851
<li class="md-nav__item">
852
<a href="../planning-agent/" class="md-nav__link">
853
854
855
856
<span class="md-ellipsis">
857
858
859
Planning Agent
860
861
862
863
</span>
864
865
866
867
</a>
868
</li>
869
870
871
872
873
874
875
876
877
878
879
880
881
<li class="md-nav__item md-nav__item--active">
882
883
<input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
884
885
886
887
888
889
<label class="md-nav__link md-nav__link--active" for="__toc">
890
891
892
893
<span class="md-ellipsis">
894
895
896
Authentication
897
898
899
900
</span>
901
902
903
904
<span class="md-nav__icon md-icon"></span>
905
</label>
906
907
<a href="./" class="md-nav__link md-nav__link--active">
908
909
910
911
<span class="md-ellipsis">
912
913
914
Authentication
915
916
917
918
</span>
919
920
921
922
</a>
923
924
925
926
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
927
928
929
930
931
932
933
<label class="md-nav__title" for="__toc">
934
<span class="md-nav__icon md-icon"></span>
935
Table of contents
936
</label>
937
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
938
939
<li class="md-nav__item">
940
<a href="#auth-strategy-overview" class="md-nav__link">
941
<span class="md-ellipsis">
942
943
Auth strategy overview
944
945
</span>
946
</a>
947
948
</li>
949
950
<li class="md-nav__item">
951
<a href="#the-auth-chain" class="md-nav__link">
952
<span class="md-ellipsis">
953
954
The auth chain
955
956
</span>
957
</a>
958
959
</li>
960
961
<li class="md-nav__item">
962
<a href="#token-storage" class="md-nav__link">
963
<span class="md-ellipsis">
964
965
Token storage
966
967
</span>
968
</a>
969
970
</li>
971
972
<li class="md-nav__item">
973
<a href="#supported-services" class="md-nav__link">
974
<span class="md-ellipsis">
975
976
Supported services
977
978
</span>
979
</a>
980
981
<nav class="md-nav" aria-label="Supported services">
982
<ul class="md-nav__list">
983
984
<li class="md-nav__item">
985
<a href="#google" class="md-nav__link">
986
<span class="md-ellipsis">
987
988
Google
989
990
</span>
991
</a>
992
993
</li>
994
995
<li class="md-nav__item">
996
<a href="#dropbox" class="md-nav__link">
997
<span class="md-ellipsis">
998
999
Dropbox
1000
1001
</span>
1002
</a>
1003
1004
</li>
1005
1006
<li class="md-nav__item">
1007
<a href="#zoom" class="md-nav__link">
1008
<span class="md-ellipsis">
1009
1010
Zoom
1011
1012
</span>
1013
</a>
1014
1015
</li>
1016
1017
<li class="md-nav__item">
1018
<a href="#notion" class="md-nav__link">
1019
<span class="md-ellipsis">
1020
1021
Notion
1022
1023
</span>
1024
</a>
1025
1026
</li>
1027
1028
<li class="md-nav__item">
1029
<a href="#github" class="md-nav__link">
1030
<span class="md-ellipsis">
1031
1032
GitHub
1033
1034
</span>
1035
</a>
1036
1037
</li>
1038
1039
<li class="md-nav__item">
1040
<a href="#microsoft" class="md-nav__link">
1041
<span class="md-ellipsis">
1042
1043
Microsoft
1044
1045
</span>
1046
</a>
1047
1048
</li>
1049
1050
</ul>
1051
</nav>
1052
1053
</li>
1054
1055
<li class="md-nav__item">
1056
<a href="#cli-usage" class="md-nav__link">
1057
<span class="md-ellipsis">
1058
1059
CLI usage
1060
1061
</span>
1062
</a>
1063
1064
<nav class="md-nav" aria-label="CLI usage">
1065
<ul class="md-nav__list">
1066
1067
<li class="md-nav__item">
1068
<a href="#planopticon-auth" class="md-nav__link">
1069
<span class="md-ellipsis">
1070
1071
planopticon auth
1072
1073
</span>
1074
</a>
1075
1076
</li>
1077
1078
<li class="md-nav__item">
1079
<a href="#companion-repl-auth" class="md-nav__link">
1080
<span class="md-ellipsis">
1081
1082
Companion REPL /auth
1083
1084
</span>
1085
</a>
1086
1087
</li>
1088
1089
</ul>
1090
</nav>
1091
1092
</li>
1093
1094
<li class="md-nav__item">
1095
<a href="#environment-variables-reference" class="md-nav__link">
1096
<span class="md-ellipsis">
1097
1098
Environment variables reference
1099
1100
</span>
1101
</a>
1102
1103
</li>
1104
1105
<li class="md-nav__item">
1106
<a href="#python-api" class="md-nav__link">
1107
<span class="md-ellipsis">
1108
1109
Python API
1110
1111
</span>
1112
</a>
1113
1114
<nav class="md-nav" aria-label="Python API">
1115
<ul class="md-nav__list">
1116
1117
<li class="md-nav__item">
1118
<a href="#authconfig" class="md-nav__link">
1119
<span class="md-ellipsis">
1120
1121
AuthConfig
1122
1123
</span>
1124
</a>
1125
1126
</li>
1127
1128
<li class="md-nav__item">
1129
<a href="#oauthmanager" class="md-nav__link">
1130
<span class="md-ellipsis">
1131
1132
OAuthManager
1133
1134
</span>
1135
</a>
1136
1137
</li>
1138
1139
<li class="md-nav__item">
1140
<a href="#pre-built-configs" class="md-nav__link">
1141
<span class="md-ellipsis">
1142
1143
Pre-built configs
1144
1145
</span>
1146
</a>
1147
1148
</li>
1149
1150
<li class="md-nav__item">
1151
<a href="#building-custom-connectors" class="md-nav__link">
1152
<span class="md-ellipsis">
1153
1154
Building custom connectors
1155
1156
</span>
1157
</a>
1158
1159
</li>
1160
1161
</ul>
1162
</nav>
1163
1164
</li>
1165
1166
<li class="md-nav__item">
1167
<a href="#troubleshooting" class="md-nav__link">
1168
<span class="md-ellipsis">
1169
1170
Troubleshooting
1171
1172
</span>
1173
</a>
1174
1175
<nav class="md-nav" aria-label="Troubleshooting">
1176
<ul class="md-nav__list">
1177
1178
<li class="md-nav__item">
1179
<a href="#no-auth-method-available-for-service" class="md-nav__link">
1180
<span class="md-ellipsis">
1181
1182
"No auth method available for {service}"
1183
1184
</span>
1185
</a>
1186
1187
</li>
1188
1189
<li class="md-nav__item">
1190
<a href="#token-refresh-fails" class="md-nav__link">
1191
<span class="md-ellipsis">
1192
1193
Token refresh fails
1194
1195
</span>
1196
</a>
1197
1198
</li>
1199
1200
<li class="md-nav__item">
1201
<a href="#oauth-pkce-flow-does-not-open-a-browser" class="md-nav__link">
1202
<span class="md-ellipsis">
1203
1204
OAuth PKCE flow does not open a browser
1205
1206
</span>
1207
</a>
1208
1209
</li>
1210
1211
<li class="md-nav__item">
1212
<a href="#requests-not-installed" class="md-nav__link">
1213
<span class="md-ellipsis">
1214
1215
"requests not installed"
1216
1217
</span>
1218
</a>
1219
1220
</li>
1221
1222
<li class="md-nav__item">
1223
<a href="#permission-denied-on-token-file" class="md-nav__link">
1224
<span class="md-ellipsis">
1225
1226
Permission denied on token file
1227
1228
</span>
1229
</a>
1230
1231
</li>
1232
1233
<li class="md-nav__item">
1234
<a href="#microsoft-authentication-uses-the-common-tenant" class="md-nav__link">
1235
<span class="md-ellipsis">
1236
1237
Microsoft authentication uses the /common tenant
1238
1239
</span>
1240
</a>
1241
1242
</li>
1243
1244
</ul>
1245
</nav>
1246
1247
</li>
1248
1249
</ul>
1250
1251
</nav>
1252
1253
</li>
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
<li class="md-nav__item">
1265
<a href="../export/" class="md-nav__link">
1266
1267
1268
1269
<span class="md-ellipsis">
1270
1271
1272
Export & Documents
1273
1274
1275
1276
</span>
1277
1278
1279
1280
</a>
1281
</li>
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
<li class="md-nav__item">
1293
<a href="../output-formats/" class="md-nav__link">
1294
1295
1296
1297
<span class="md-ellipsis">
1298
1299
1300
Output Formats
1301
1302
1303
1304
</span>
1305
1306
1307
1308
</a>
1309
</li>
1310
1311
1312
1313
1314
</ul>
1315
</nav>
1316
1317
</li>
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
<li class="md-nav__item">
1328
<a href="../../use-cases/" class="md-nav__link">
1329
1330
1331
1332
<span class="md-ellipsis">
1333
1334
1335
Use Cases
1336
1337
1338
1339
</span>
1340
1341
1342
1343
</a>
1344
</li>
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
<li class="md-nav__item">
1355
<a href="../../cli-reference/" class="md-nav__link">
1356
1357
1358
1359
<span class="md-ellipsis">
1360
1361
1362
CLI Reference
1363
1364
1365
1366
</span>
1367
1368
1369
1370
</a>
1371
</li>
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
<li class="md-nav__item md-nav__item--nested">
1392
1393
1394
1395
1396
1397
<input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_6" >
1398
1399
1400
<label class="md-nav__link" for="__nav_6" id="__nav_6_label" tabindex="0">
1401
1402
1403
1404
<span class="md-ellipsis">
1405
1406
1407
Architecture
1408
1409
1410
1411
</span>
1412
1413
1414
1415
<span class="md-nav__icon md-icon"></span>
1416
</label>
1417
1418
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_6_label" aria-expanded="false">
1419
<label class="md-nav__title" for="__nav_6">
1420
<span class="md-nav__icon md-icon"></span>
1421
1422
1423
Architecture
1424
1425
1426
</label>
1427
<ul class="md-nav__list" data-md-scrollfix>
1428
1429
1430
1431
1432
1433
1434
1435
<li class="md-nav__item">
1436
<a href="../../architecture/overview/" class="md-nav__link">
1437
1438
1439
1440
<span class="md-ellipsis">
1441
1442
1443
Overview
1444
1445
1446
1447
</span>
1448
1449
1450
1451
</a>
1452
</li>
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
<li class="md-nav__item">
1464
<a href="../../architecture/providers/" class="md-nav__link">
1465
1466
1467
1468
<span class="md-ellipsis">
1469
1470
1471
Provider System
1472
1473
1474
1475
</span>
1476
1477
1478
1479
</a>
1480
</li>
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
<li class="md-nav__item">
1492
<a href="../../architecture/pipeline/" class="md-nav__link">
1493
1494
1495
1496
<span class="md-ellipsis">
1497
1498
1499
Processing Pipeline
1500
1501
1502
1503
</span>
1504
1505
1506
1507
</a>
1508
</li>
1509
1510
1511
1512
1513
</ul>
1514
</nav>
1515
1516
</li>
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
<li class="md-nav__item md-nav__item--nested">
1537
1538
1539
1540
1541
1542
<input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_7" >
1543
1544
1545
<label class="md-nav__link" for="__nav_7" id="__nav_7_label" tabindex="0">
1546
1547
1548
1549
<span class="md-ellipsis">
1550
1551
1552
API Reference
1553
1554
1555
1556
</span>
1557
1558
1559
1560
<span class="md-nav__icon md-icon"></span>
1561
</label>
1562
1563
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_7_label" aria-expanded="false">
1564
<label class="md-nav__title" for="__nav_7">
1565
<span class="md-nav__icon md-icon"></span>
1566
1567
1568
API Reference
1569
1570
1571
</label>
1572
<ul class="md-nav__list" data-md-scrollfix>
1573
1574
1575
1576
1577
1578
1579
1580
<li class="md-nav__item">
1581
<a href="../../api/models/" class="md-nav__link">
1582
1583
1584
1585
<span class="md-ellipsis">
1586
1587
1588
Models
1589
1590
1591
1592
</span>
1593
1594
1595
1596
</a>
1597
</li>
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
<li class="md-nav__item">
1609
<a href="../../api/providers/" class="md-nav__link">
1610
1611
1612
1613
<span class="md-ellipsis">
1614
1615
1616
Providers
1617
1618
1619
1620
</span>
1621
1622
1623
1624
</a>
1625
</li>
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
<li class="md-nav__item">
1637
<a href="../../api/analyzers/" class="md-nav__link">
1638
1639
1640
1641
<span class="md-ellipsis">
1642
1643
1644
Analyzers
1645
1646
1647
1648
</span>
1649
1650
1651
1652
</a>
1653
</li>
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
<li class="md-nav__item">
1665
<a href="../../api/agent/" class="md-nav__link">
1666
1667
1668
1669
<span class="md-ellipsis">
1670
1671
1672
Agent & Skills
1673
1674
1675
1676
</span>
1677
1678
1679
1680
</a>
1681
</li>
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
<li class="md-nav__item">
1693
<a href="../../api/sources/" class="md-nav__link">
1694
1695
1696
1697
<span class="md-ellipsis">
1698
1699
1700
Sources
1701
1702
1703
1704
</span>
1705
1706
1707
1708
</a>
1709
</li>
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
<li class="md-nav__item">
1721
<a href="../../api/auth/" class="md-nav__link">
1722
1723
1724
1725
<span class="md-ellipsis">
1726
1727
1728
Authentication
1729
1730
1731
1732
</span>
1733
1734
1735
1736
</a>
1737
</li>
1738
1739
1740
1741
1742
</ul>
1743
</nav>
1744
1745
</li>
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
<li class="md-nav__item">
1756
<a href="../../faq/" class="md-nav__link">
1757
1758
1759
1760
<span class="md-ellipsis">
1761
1762
1763
FAQ & Troubleshooting
1764
1765
1766
1767
</span>
1768
1769
1770
1771
</a>
1772
</li>
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
<li class="md-nav__item">
1783
<a href="../../contributing/" class="md-nav__link">
1784
1785
1786
1787
<span class="md-ellipsis">
1788
1789
1790
Contributing
1791
1792
1793
1794
</span>
1795
1796
1797
1798
</a>
1799
</li>
1800
1801
1802
1803
</ul>
1804
</nav>
1805
</div>
1806
</div>
1807
</div>
1808
1809
1810
1811
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
1812
<div class="md-sidebar__scrollwrap">
1813
<div class="md-sidebar__inner">
1814
1815
1816
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
1817
1818
1819
1820
1821
1822
1823
<label class="md-nav__title" for="__toc">
1824
<span class="md-nav__icon md-icon"></span>
1825
Table of contents
1826
</label>
1827
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
1828
1829
<li class="md-nav__item">
1830
<a href="#auth-strategy-overview" class="md-nav__link">
1831
<span class="md-ellipsis">
1832
1833
Auth strategy overview
1834
1835
</span>
1836
</a>
1837
1838
</li>
1839
1840
<li class="md-nav__item">
1841
<a href="#the-auth-chain" class="md-nav__link">
1842
<span class="md-ellipsis">
1843
1844
The auth chain
1845
1846
</span>
1847
</a>
1848
1849
</li>
1850
1851
<li class="md-nav__item">
1852
<a href="#token-storage" class="md-nav__link">
1853
<span class="md-ellipsis">
1854
1855
Token storage
1856
1857
</span>
1858
</a>
1859
1860
</li>
1861
1862
<li class="md-nav__item">
1863
<a href="#supported-services" class="md-nav__link">
1864
<span class="md-ellipsis">
1865
1866
Supported services
1867
1868
</span>
1869
</a>
1870
1871
<nav class="md-nav" aria-label="Supported services">
1872
<ul class="md-nav__list">
1873
1874
<li class="md-nav__item">
1875
<a href="#google" class="md-nav__link">
1876
<span class="md-ellipsis">
1877
1878
Google
1879
1880
</span>
1881
</a>
1882
1883
</li>
1884
1885
<li class="md-nav__item">
1886
<a href="#dropbox" class="md-nav__link">
1887
<span class="md-ellipsis">
1888
1889
Dropbox
1890
1891
</span>
1892
</a>
1893
1894
</li>
1895
1896
<li class="md-nav__item">
1897
<a href="#zoom" class="md-nav__link">
1898
<span class="md-ellipsis">
1899
1900
Zoom
1901
1902
</span>
1903
</a>
1904
1905
</li>
1906
1907
<li class="md-nav__item">
1908
<a href="#notion" class="md-nav__link">
1909
<span class="md-ellipsis">
1910
1911
Notion
1912
1913
</span>
1914
</a>
1915
1916
</li>
1917
1918
<li class="md-nav__item">
1919
<a href="#github" class="md-nav__link">
1920
<span class="md-ellipsis">
1921
1922
GitHub
1923
1924
</span>
1925
</a>
1926
1927
</li>
1928
1929
<li class="md-nav__item">
1930
<a href="#microsoft" class="md-nav__link">
1931
<span class="md-ellipsis">
1932
1933
Microsoft
1934
1935
</span>
1936
</a>
1937
1938
</li>
1939
1940
</ul>
1941
</nav>
1942
1943
</li>
1944
1945
<li class="md-nav__item">
1946
<a href="#cli-usage" class="md-nav__link">
1947
<span class="md-ellipsis">
1948
1949
CLI usage
1950
1951
</span>
1952
</a>
1953
1954
<nav class="md-nav" aria-label="CLI usage">
1955
<ul class="md-nav__list">
1956
1957
<li class="md-nav__item">
1958
<a href="#planopticon-auth" class="md-nav__link">
1959
<span class="md-ellipsis">
1960
1961
planopticon auth
1962
1963
</span>
1964
</a>
1965
1966
</li>
1967
1968
<li class="md-nav__item">
1969
<a href="#companion-repl-auth" class="md-nav__link">
1970
<span class="md-ellipsis">
1971
1972
Companion REPL /auth
1973
1974
</span>
1975
</a>
1976
1977
</li>
1978
1979
</ul>
1980
</nav>
1981
1982
</li>
1983
1984
<li class="md-nav__item">
1985
<a href="#environment-variables-reference" class="md-nav__link">
1986
<span class="md-ellipsis">
1987
1988
Environment variables reference
1989
1990
</span>
1991
</a>
1992
1993
</li>
1994
1995
<li class="md-nav__item">
1996
<a href="#python-api" class="md-nav__link">
1997
<span class="md-ellipsis">
1998
1999
Python API
2000
2001
</span>
2002
</a>
2003
2004
<nav class="md-nav" aria-label="Python API">
2005
<ul class="md-nav__list">
2006
2007
<li class="md-nav__item">
2008
<a href="#authconfig" class="md-nav__link">
2009
<span class="md-ellipsis">
2010
2011
AuthConfig
2012
2013
</span>
2014
</a>
2015
2016
</li>
2017
2018
<li class="md-nav__item">
2019
<a href="#oauthmanager" class="md-nav__link">
2020
<span class="md-ellipsis">
2021
2022
OAuthManager
2023
2024
</span>
2025
</a>
2026
2027
</li>
2028
2029
<li class="md-nav__item">
2030
<a href="#pre-built-configs" class="md-nav__link">
2031
<span class="md-ellipsis">
2032
2033
Pre-built configs
2034
2035
</span>
2036
</a>
2037
2038
</li>
2039
2040
<li class="md-nav__item">
2041
<a href="#building-custom-connectors" class="md-nav__link">
2042
<span class="md-ellipsis">
2043
2044
Building custom connectors
2045
2046
</span>
2047
</a>
2048
2049
</li>
2050
2051
</ul>
2052
</nav>
2053
2054
</li>
2055
2056
<li class="md-nav__item">
2057
<a href="#troubleshooting" class="md-nav__link">
2058
<span class="md-ellipsis">
2059
2060
Troubleshooting
2061
2062
</span>
2063
</a>
2064
2065
<nav class="md-nav" aria-label="Troubleshooting">
2066
<ul class="md-nav__list">
2067
2068
<li class="md-nav__item">
2069
<a href="#no-auth-method-available-for-service" class="md-nav__link">
2070
<span class="md-ellipsis">
2071
2072
"No auth method available for {service}"
2073
2074
</span>
2075
</a>
2076
2077
</li>
2078
2079
<li class="md-nav__item">
2080
<a href="#token-refresh-fails" class="md-nav__link">
2081
<span class="md-ellipsis">
2082
2083
Token refresh fails
2084
2085
</span>
2086
</a>
2087
2088
</li>
2089
2090
<li class="md-nav__item">
2091
<a href="#oauth-pkce-flow-does-not-open-a-browser" class="md-nav__link">
2092
<span class="md-ellipsis">
2093
2094
OAuth PKCE flow does not open a browser
2095
2096
</span>
2097
</a>
2098
2099
</li>
2100
2101
<li class="md-nav__item">
2102
<a href="#requests-not-installed" class="md-nav__link">
2103
<span class="md-ellipsis">
2104
2105
"requests not installed"
2106
2107
</span>
2108
</a>
2109
2110
</li>
2111
2112
<li class="md-nav__item">
2113
<a href="#permission-denied-on-token-file" class="md-nav__link">
2114
<span class="md-ellipsis">
2115
2116
Permission denied on token file
2117
2118
</span>
2119
</a>
2120
2121
</li>
2122
2123
<li class="md-nav__item">
2124
<a href="#microsoft-authentication-uses-the-common-tenant" class="md-nav__link">
2125
<span class="md-ellipsis">
2126
2127
Microsoft authentication uses the /common tenant
2128
2129
</span>
2130
</a>
2131
2132
</li>
2133
2134
</ul>
2135
</nav>
2136
2137
</li>
2138
2139
</ul>
2140
2141
</nav>
2142
</div>
2143
</div>
2144
</div>
2145
2146
2147
2148
<div class="md-content" data-md-component="content">
2149
2150
<article class="md-content__inner md-typeset">
2151
2152
2153
2154
2155
2156
2157
2158
2159
<h1 id="authentication">Authentication<a class="headerlink" href="#authentication" title="Permanent link">&para;</a></h1>
2160
<p>PlanOpticon uses a unified authentication system to connect with cloud services for fetching recordings, documents, and other content. The system is <strong>OAuth-first</strong>: it prefers OAuth 2.0 flows for security and token management, but falls back to API keys when OAuth is not configured.</p>
2161
<h2 id="auth-strategy-overview">Auth strategy overview<a class="headerlink" href="#auth-strategy-overview" title="Permanent link">&para;</a></h2>
2162
<p>PlanOpticon supports six cloud services out of the box: Google, Dropbox, Zoom, Notion, GitHub, and Microsoft. Each service uses the same authentication chain, implemented through the <code>OAuthManager</code> class. You configure credentials once (via environment variables or directly), and PlanOpticon handles token acquisition, storage, refresh, and fallback automatically.</p>
2163
<p>All authentication state is managed through the <code>planopticon auth</code> CLI command, the <code>/auth</code> companion REPL command, or programmatically via the Python API.</p>
2164
<h2 id="the-auth-chain">The auth chain<a class="headerlink" href="#the-auth-chain" title="Permanent link">&para;</a></h2>
2165
<p>When you authenticate with a service, PlanOpticon tries the following methods in order. It stops at the first one that succeeds:</p>
2166
<ol>
2167
<li>
2168
<p><strong>Saved token</strong> -- Checks <code>~/.planopticon/{service}_token.json</code> for a previously saved token. If the token has not expired, it is used immediately. If it has expired but a refresh token is available, PlanOpticon attempts an automatic token refresh.</p>
2169
</li>
2170
<li>
2171
<p><strong>Client Credentials grant</strong> (Server-to-Server) -- If an <code>account_id</code> is configured (e.g., <code>ZOOM_ACCOUNT_ID</code>), PlanOpticon attempts a client credentials grant. This is a non-interactive flow suitable for automated pipelines and server-side integrations. No browser is required.</p>
2172
</li>
2173
<li>
2174
<p><strong>OAuth 2.0 Authorization Code with PKCE</strong> (interactive) -- If a client ID is configured and OAuth endpoints are available, PlanOpticon initiates an interactive OAuth PKCE flow. It opens a browser to the service's authorization page, waits for you to paste the authorization code, and exchanges it for tokens. The tokens are saved for future use.</p>
2175
</li>
2176
<li>
2177
<p><strong>API key fallback</strong> -- If no OAuth method succeeds, PlanOpticon checks for a service-specific API key environment variable (e.g., <code>GITHUB_TOKEN</code>, <code>NOTION_API_KEY</code>). This is the simplest setup but may have reduced capabilities compared to OAuth.</p>
2178
</li>
2179
</ol>
2180
<p>If none of the four methods succeed, PlanOpticon returns an error with hints about which environment variables to set.</p>
2181
<h2 id="token-storage">Token storage<a class="headerlink" href="#token-storage" title="Permanent link">&para;</a></h2>
2182
<p>Tokens are persisted as JSON files in <code>~/.planopticon/</code>:</p>
2183
<div class="highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a>~/.planopticon/
2184
<a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a> google_token.json
2185
<a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a> dropbox_token.json
2186
<a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a> zoom_token.json
2187
<a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a> notion_token.json
2188
<a id="__codelineno-0-6" name="__codelineno-0-6" href="#__codelineno-0-6"></a> github_token.json
2189
<a id="__codelineno-0-7" name="__codelineno-0-7" href="#__codelineno-0-7"></a> microsoft_token.json
2190
</code></pre></div>
2191
<p>Each token file contains:</p>
2192
<table>
2193
<thead>
2194
<tr>
2195
<th>Field</th>
2196
<th>Description</th>
2197
</tr>
2198
</thead>
2199
<tbody>
2200
<tr>
2201
<td><code>access_token</code></td>
2202
<td>The current access token</td>
2203
</tr>
2204
<tr>
2205
<td><code>refresh_token</code></td>
2206
<td>Refresh token for automatic renewal (if provided by the service)</td>
2207
</tr>
2208
<tr>
2209
<td><code>expires_at</code></td>
2210
<td>Unix timestamp when the token expires (with a 60-second safety margin)</td>
2211
</tr>
2212
<tr>
2213
<td><code>client_id</code></td>
2214
<td>The client ID used for this token (for refresh)</td>
2215
</tr>
2216
<tr>
2217
<td><code>client_secret</code></td>
2218
<td>The client secret used (for refresh)</td>
2219
</tr>
2220
</tbody>
2221
</table>
2222
<p>The <code>~/.planopticon/</code> directory is created automatically on first use. Token files are overwritten on each successful authentication or refresh.</p>
2223
<p>To remove a saved token, use <code>planopticon auth &lt;service&gt; --logout</code> or delete the file directly.</p>
2224
<h2 id="supported-services">Supported services<a class="headerlink" href="#supported-services" title="Permanent link">&para;</a></h2>
2225
<h3 id="google">Google<a class="headerlink" href="#google" title="Permanent link">&para;</a></h3>
2226
<p>Google authentication provides access to Google Drive and Google Docs for fetching documents, recordings, and other content.</p>
2227
<p><strong>Scopes requested:</strong></p>
2228
<ul>
2229
<li><code>https://www.googleapis.com/auth/drive.readonly</code></li>
2230
<li><code>https://www.googleapis.com/auth/documents.readonly</code></li>
2231
</ul>
2232
<p><strong>Environment variables:</strong></p>
2233
<table>
2234
<thead>
2235
<tr>
2236
<th>Variable</th>
2237
<th>Required</th>
2238
<th>Description</th>
2239
</tr>
2240
</thead>
2241
<tbody>
2242
<tr>
2243
<td><code>GOOGLE_CLIENT_ID</code></td>
2244
<td>For OAuth</td>
2245
<td>OAuth 2.0 Client ID from Google Cloud Console</td>
2246
</tr>
2247
<tr>
2248
<td><code>GOOGLE_CLIENT_SECRET</code></td>
2249
<td>For OAuth</td>
2250
<td>OAuth 2.0 Client Secret</td>
2251
</tr>
2252
<tr>
2253
<td><code>GOOGLE_API_KEY</code></td>
2254
<td>Fallback</td>
2255
<td>API key (limited access, no user-specific data)</td>
2256
</tr>
2257
</tbody>
2258
</table>
2259
<p><strong>OAuth app setup:</strong></p>
2260
<ol>
2261
<li>Go to the <a href="https://console.cloud.google.com/">Google Cloud Console</a>.</li>
2262
<li>Create a project (or select an existing one).</li>
2263
<li>Navigate to <strong>APIs &amp; Services &gt; Credentials</strong>.</li>
2264
<li>Click <strong>Create Credentials &gt; OAuth client ID</strong>.</li>
2265
<li>Choose <strong>Desktop app</strong> as the application type.</li>
2266
<li>Copy the Client ID and Client Secret.</li>
2267
<li>Under <strong>APIs &amp; Services &gt; Library</strong>, enable the <strong>Google Drive API</strong> and <strong>Google Docs API</strong>.</li>
2268
<li>Set the environment variables:</li>
2269
</ol>
2270
<div class="highlight"><pre><span></span><code><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a><span class="nb">export</span><span class="w"> </span><span class="nv">GOOGLE_CLIENT_ID</span><span class="o">=</span><span class="s2">&quot;your-client-id.apps.googleusercontent.com&quot;</span>
2271
<a id="__codelineno-1-2" name="__codelineno-1-2" href="#__codelineno-1-2"></a><span class="nb">export</span><span class="w"> </span><span class="nv">GOOGLE_CLIENT_SECRET</span><span class="o">=</span><span class="s2">&quot;your-client-secret&quot;</span>
2272
</code></pre></div>
2273
<p><strong>Service account fallback:</strong> For automated pipelines, you can use a Google service account instead of OAuth. Generate a service account key JSON file from the Google Cloud Console and set <code>GOOGLE_APPLICATION_CREDENTIALS</code> to point to it. The PlanOpticon Google Workspace connector (<code>planopticon gws</code>) uses the <code>gws</code> CLI which has its own auth flow via <code>gws auth login</code>.</p>
2274
<h3 id="dropbox">Dropbox<a class="headerlink" href="#dropbox" title="Permanent link">&para;</a></h3>
2275
<p>Dropbox authentication provides access to files stored in Dropbox.</p>
2276
<p><strong>Environment variables:</strong></p>
2277
<table>
2278
<thead>
2279
<tr>
2280
<th>Variable</th>
2281
<th>Required</th>
2282
<th>Description</th>
2283
</tr>
2284
</thead>
2285
<tbody>
2286
<tr>
2287
<td><code>DROPBOX_APP_KEY</code></td>
2288
<td>For OAuth</td>
2289
<td>App key from the Dropbox App Console</td>
2290
</tr>
2291
<tr>
2292
<td><code>DROPBOX_APP_SECRET</code></td>
2293
<td>For OAuth</td>
2294
<td>App secret</td>
2295
</tr>
2296
<tr>
2297
<td><code>DROPBOX_ACCESS_TOKEN</code></td>
2298
<td>Fallback</td>
2299
<td>Long-lived access token (for quick setup)</td>
2300
</tr>
2301
</tbody>
2302
</table>
2303
<p><strong>OAuth app setup:</strong></p>
2304
<ol>
2305
<li>Go to the <a href="https://www.dropbox.com/developers/apps">Dropbox App Console</a>.</li>
2306
<li>Click <strong>Create App</strong>.</li>
2307
<li>Choose <strong>Scoped access</strong> and <strong>Full Dropbox</strong> (or <strong>App folder</strong> for restricted access).</li>
2308
<li>Copy the App key and App secret from the <strong>Settings</strong> tab.</li>
2309
<li>Set the environment variables:</li>
2310
</ol>
2311
<div class="highlight"><pre><span></span><code><a id="__codelineno-2-1" name="__codelineno-2-1" href="#__codelineno-2-1"></a><span class="nb">export</span><span class="w"> </span><span class="nv">DROPBOX_APP_KEY</span><span class="o">=</span><span class="s2">&quot;your-app-key&quot;</span>
2312
<a id="__codelineno-2-2" name="__codelineno-2-2" href="#__codelineno-2-2"></a><span class="nb">export</span><span class="w"> </span><span class="nv">DROPBOX_APP_SECRET</span><span class="o">=</span><span class="s2">&quot;your-app-secret&quot;</span>
2313
</code></pre></div>
2314
<p><strong>Access token shortcut:</strong> For quick testing, you can generate an access token directly from the app's Settings page in the Dropbox App Console and set it as <code>DROPBOX_ACCESS_TOKEN</code>. This bypasses OAuth entirely but the token may have a limited lifetime.</p>
2315
<h3 id="zoom">Zoom<a class="headerlink" href="#zoom" title="Permanent link">&para;</a></h3>
2316
<p>Zoom authentication provides access to cloud recordings, meeting metadata, and transcripts.</p>
2317
<p><strong>Environment variables:</strong></p>
2318
<table>
2319
<thead>
2320
<tr>
2321
<th>Variable</th>
2322
<th>Required</th>
2323
<th>Description</th>
2324
</tr>
2325
</thead>
2326
<tbody>
2327
<tr>
2328
<td><code>ZOOM_CLIENT_ID</code></td>
2329
<td>For OAuth</td>
2330
<td>OAuth client ID from the Zoom Marketplace</td>
2331
</tr>
2332
<tr>
2333
<td><code>ZOOM_CLIENT_SECRET</code></td>
2334
<td>For OAuth</td>
2335
<td>OAuth client secret</td>
2336
</tr>
2337
<tr>
2338
<td><code>ZOOM_ACCOUNT_ID</code></td>
2339
<td>For S2S</td>
2340
<td>Account ID for Server-to-Server OAuth</td>
2341
</tr>
2342
</tbody>
2343
</table>
2344
<p><strong>Server-to-Server (recommended for automation):</strong></p>
2345
<p>When <code>ZOOM_ACCOUNT_ID</code> is set alongside <code>ZOOM_CLIENT_ID</code> and <code>ZOOM_CLIENT_SECRET</code>, PlanOpticon uses the client credentials grant (Server-to-Server OAuth). This is non-interactive and ideal for CI/CD pipelines and scheduled jobs.</p>
2346
<ol>
2347
<li>Go to the <a href="https://marketplace.zoom.us/">Zoom Marketplace</a>.</li>
2348
<li>Click <strong>Develop &gt; Build App</strong>.</li>
2349
<li>Choose <strong>Server-to-Server OAuth</strong>.</li>
2350
<li>Copy the Account ID, Client ID, and Client Secret.</li>
2351
<li>Add the required scopes: <code>recording:read:admin</code> (or <code>recording:read</code>).</li>
2352
<li>Set the environment variables:</li>
2353
</ol>
2354
<div class="highlight"><pre><span></span><code><a id="__codelineno-3-1" name="__codelineno-3-1" href="#__codelineno-3-1"></a><span class="nb">export</span><span class="w"> </span><span class="nv">ZOOM_CLIENT_ID</span><span class="o">=</span><span class="s2">&quot;your-client-id&quot;</span>
2355
<a id="__codelineno-3-2" name="__codelineno-3-2" href="#__codelineno-3-2"></a><span class="nb">export</span><span class="w"> </span><span class="nv">ZOOM_CLIENT_SECRET</span><span class="o">=</span><span class="s2">&quot;your-client-secret&quot;</span>
2356
<a id="__codelineno-3-3" name="__codelineno-3-3" href="#__codelineno-3-3"></a><span class="nb">export</span><span class="w"> </span><span class="nv">ZOOM_ACCOUNT_ID</span><span class="o">=</span><span class="s2">&quot;your-account-id&quot;</span>
2357
</code></pre></div>
2358
<p><strong>User-level OAuth PKCE:</strong></p>
2359
<p>If <code>ZOOM_ACCOUNT_ID</code> is not set, PlanOpticon falls back to the interactive OAuth PKCE flow. This opens a browser window for the user to authorize access.</p>
2360
<ol>
2361
<li>In the Zoom Marketplace, create a <strong>General App</strong> (or <strong>OAuth</strong> app).</li>
2362
<li>Set the redirect URI to <code>urn:ietf:wg:oauth:2.0:oob</code> (out-of-band).</li>
2363
<li>Copy the Client ID and Client Secret.</li>
2364
</ol>
2365
<h3 id="notion">Notion<a class="headerlink" href="#notion" title="Permanent link">&para;</a></h3>
2366
<p>Notion authentication provides access to pages, databases, and content in your Notion workspace.</p>
2367
<p><strong>Environment variables:</strong></p>
2368
<table>
2369
<thead>
2370
<tr>
2371
<th>Variable</th>
2372
<th>Required</th>
2373
<th>Description</th>
2374
</tr>
2375
</thead>
2376
<tbody>
2377
<tr>
2378
<td><code>NOTION_CLIENT_ID</code></td>
2379
<td>For OAuth</td>
2380
<td>OAuth client ID from the Notion Integrations page</td>
2381
</tr>
2382
<tr>
2383
<td><code>NOTION_CLIENT_SECRET</code></td>
2384
<td>For OAuth</td>
2385
<td>OAuth client secret</td>
2386
</tr>
2387
<tr>
2388
<td><code>NOTION_API_KEY</code></td>
2389
<td>Fallback</td>
2390
<td>Internal integration token</td>
2391
</tr>
2392
</tbody>
2393
</table>
2394
<p><strong>OAuth app setup:</strong></p>
2395
<ol>
2396
<li>Go to <a href="https://www.notion.so/my-integrations">My Integrations</a> in Notion.</li>
2397
<li>Click <strong>New integration</strong>.</li>
2398
<li>Select <strong>Public integration</strong> (required for OAuth).</li>
2399
<li>Copy the OAuth Client ID and Client Secret.</li>
2400
<li>Set the redirect URI.</li>
2401
<li>Set the environment variables:</li>
2402
</ol>
2403
<div class="highlight"><pre><span></span><code><a id="__codelineno-4-1" name="__codelineno-4-1" href="#__codelineno-4-1"></a><span class="nb">export</span><span class="w"> </span><span class="nv">NOTION_CLIENT_ID</span><span class="o">=</span><span class="s2">&quot;your-client-id&quot;</span>
2404
<a id="__codelineno-4-2" name="__codelineno-4-2" href="#__codelineno-4-2"></a><span class="nb">export</span><span class="w"> </span><span class="nv">NOTION_CLIENT_SECRET</span><span class="o">=</span><span class="s2">&quot;your-client-secret&quot;</span>
2405
</code></pre></div>
2406
<p><strong>Internal integration (API key fallback):</strong></p>
2407
<p>For simpler setups, create an <strong>Internal integration</strong> from the Notion Integrations page. Copy the integration token and set it as <code>NOTION_API_KEY</code>. You must also share the relevant Notion pages/databases with the integration.</p>
2408
<div class="highlight"><pre><span></span><code><a id="__codelineno-5-1" name="__codelineno-5-1" href="#__codelineno-5-1"></a><span class="nb">export</span><span class="w"> </span><span class="nv">NOTION_API_KEY</span><span class="o">=</span><span class="s2">&quot;ntn_your-integration-token&quot;</span>
2409
</code></pre></div>
2410
<h3 id="github">GitHub<a class="headerlink" href="#github" title="Permanent link">&para;</a></h3>
2411
<p>GitHub authentication provides access to repositories, issues, and organization data.</p>
2412
<p><strong>Scopes requested:</strong></p>
2413
<ul>
2414
<li><code>repo</code></li>
2415
<li><code>read:org</code></li>
2416
</ul>
2417
<p><strong>Environment variables:</strong></p>
2418
<table>
2419
<thead>
2420
<tr>
2421
<th>Variable</th>
2422
<th>Required</th>
2423
<th>Description</th>
2424
</tr>
2425
</thead>
2426
<tbody>
2427
<tr>
2428
<td><code>GITHUB_CLIENT_ID</code></td>
2429
<td>For OAuth</td>
2430
<td>OAuth App client ID</td>
2431
</tr>
2432
<tr>
2433
<td><code>GITHUB_CLIENT_SECRET</code></td>
2434
<td>For OAuth</td>
2435
<td>OAuth App client secret</td>
2436
</tr>
2437
<tr>
2438
<td><code>GITHUB_TOKEN</code></td>
2439
<td>Fallback</td>
2440
<td>Personal access token (classic or fine-grained)</td>
2441
</tr>
2442
</tbody>
2443
</table>
2444
<p><strong>OAuth app setup:</strong></p>
2445
<ol>
2446
<li>Go to <strong>GitHub &gt; Settings &gt; Developer Settings &gt; OAuth Apps</strong>.</li>
2447
<li>Click <strong>New OAuth App</strong>.</li>
2448
<li>Set the Authorization callback URL to <code>urn:ietf:wg:oauth:2.0:oob</code>.</li>
2449
<li>Copy the Client ID and generate a Client Secret.</li>
2450
<li>Set the environment variables:</li>
2451
</ol>
2452
<div class="highlight"><pre><span></span><code><a id="__codelineno-6-1" name="__codelineno-6-1" href="#__codelineno-6-1"></a><span class="nb">export</span><span class="w"> </span><span class="nv">GITHUB_CLIENT_ID</span><span class="o">=</span><span class="s2">&quot;your-client-id&quot;</span>
2453
<a id="__codelineno-6-2" name="__codelineno-6-2" href="#__codelineno-6-2"></a><span class="nb">export</span><span class="w"> </span><span class="nv">GITHUB_CLIENT_SECRET</span><span class="o">=</span><span class="s2">&quot;your-client-secret&quot;</span>
2454
</code></pre></div>
2455
<p><strong>Personal access token (recommended for most users):</strong></p>
2456
<p>The simplest approach is to create a Personal Access Token:</p>
2457
<ol>
2458
<li>Go to <strong>GitHub &gt; Settings &gt; Developer Settings &gt; Personal Access Tokens</strong>.</li>
2459
<li>Generate a token with <code>repo</code> and <code>read:org</code> scopes.</li>
2460
<li>Set it as <code>GITHUB_TOKEN</code>:</li>
2461
</ol>
2462
<div class="highlight"><pre><span></span><code><a id="__codelineno-7-1" name="__codelineno-7-1" href="#__codelineno-7-1"></a><span class="nb">export</span><span class="w"> </span><span class="nv">GITHUB_TOKEN</span><span class="o">=</span><span class="s2">&quot;ghp_your-token&quot;</span>
2463
</code></pre></div>
2464
<h3 id="microsoft">Microsoft<a class="headerlink" href="#microsoft" title="Permanent link">&para;</a></h3>
2465
<p>Microsoft authentication provides access to Microsoft 365 resources via the Microsoft Graph API, including OneDrive, SharePoint, and Teams recordings.</p>
2466
<p><strong>Scopes requested:</strong></p>
2467
<ul>
2468
<li><code>https://graph.microsoft.com/OnlineMeetings.Read</code></li>
2469
<li><code>https://graph.microsoft.com/Files.Read</code></li>
2470
</ul>
2471
<p><strong>Environment variables:</strong></p>
2472
<table>
2473
<thead>
2474
<tr>
2475
<th>Variable</th>
2476
<th>Required</th>
2477
<th>Description</th>
2478
</tr>
2479
</thead>
2480
<tbody>
2481
<tr>
2482
<td><code>MICROSOFT_CLIENT_ID</code></td>
2483
<td>For OAuth</td>
2484
<td>Application (client) ID from Azure AD</td>
2485
</tr>
2486
<tr>
2487
<td><code>MICROSOFT_CLIENT_SECRET</code></td>
2488
<td>For OAuth</td>
2489
<td>Client secret from Azure AD</td>
2490
</tr>
2491
</tbody>
2492
</table>
2493
<p><strong>Azure AD app registration:</strong></p>
2494
<ol>
2495
<li>Go to the <a href="https://portal.azure.com/">Azure Portal</a>.</li>
2496
<li>Navigate to <strong>Azure Active Directory &gt; App registrations</strong>.</li>
2497
<li>Click <strong>New registration</strong>.</li>
2498
<li>Name the application (e.g., "PlanOpticon").</li>
2499
<li>Under <strong>Supported account types</strong>, select the appropriate option for your organization.</li>
2500
<li>Set the redirect URI to <code>urn:ietf:wg:oauth:2.0:oob</code> with platform <strong>Mobile and desktop applications</strong>.</li>
2501
<li>After registration, go to <strong>Certificates &amp; secrets</strong> and create a new client secret.</li>
2502
<li>Under <strong>API permissions</strong>, add:<ul>
2503
<li><code>OnlineMeetings.Read</code></li>
2504
<li><code>Files.Read</code></li>
2505
</ul>
2506
</li>
2507
<li>Grant admin consent if required by your organization.</li>
2508
<li>Set the environment variables:</li>
2509
</ol>
2510
<div class="highlight"><pre><span></span><code><a id="__codelineno-8-1" name="__codelineno-8-1" href="#__codelineno-8-1"></a><span class="nb">export</span><span class="w"> </span><span class="nv">MICROSOFT_CLIENT_ID</span><span class="o">=</span><span class="s2">&quot;your-application-id&quot;</span>
2511
<a id="__codelineno-8-2" name="__codelineno-8-2" href="#__codelineno-8-2"></a><span class="nb">export</span><span class="w"> </span><span class="nv">MICROSOFT_CLIENT_SECRET</span><span class="o">=</span><span class="s2">&quot;your-client-secret&quot;</span>
2512
</code></pre></div>
2513
<p><strong>Microsoft 365 CLI:</strong> The <code>planopticon m365</code> commands use the <code>@pnp/cli-microsoft365</code> npm package, which has its own authentication flow via <code>m365 login</code>. This is separate from the OAuth flow described above.</p>
2514
<h2 id="cli-usage">CLI usage<a class="headerlink" href="#cli-usage" title="Permanent link">&para;</a></h2>
2515
<h3 id="planopticon-auth"><code>planopticon auth</code><a class="headerlink" href="#planopticon-auth" title="Permanent link">&para;</a></h3>
2516
<p>Authenticate with a cloud service or manage saved tokens.</p>
2517
<div class="highlight"><pre><span></span><code><a id="__codelineno-9-1" name="__codelineno-9-1" href="#__codelineno-9-1"></a>planopticon auth SERVICE [--logout]
2518
</code></pre></div>
2519
<p><strong>Arguments:</strong></p>
2520
<table>
2521
<thead>
2522
<tr>
2523
<th>Argument</th>
2524
<th>Description</th>
2525
</tr>
2526
</thead>
2527
<tbody>
2528
<tr>
2529
<td><code>SERVICE</code></td>
2530
<td>One of: <code>google</code>, <code>dropbox</code>, <code>zoom</code>, <code>notion</code>, <code>github</code>, <code>microsoft</code></td>
2531
</tr>
2532
</tbody>
2533
</table>
2534
<p><strong>Options:</strong></p>
2535
<table>
2536
<thead>
2537
<tr>
2538
<th>Option</th>
2539
<th>Description</th>
2540
</tr>
2541
</thead>
2542
<tbody>
2543
<tr>
2544
<td><code>--logout</code></td>
2545
<td>Clear the saved token for the specified service</td>
2546
</tr>
2547
</tbody>
2548
</table>
2549
<p><strong>Examples:</strong></p>
2550
<div class="highlight"><pre><span></span><code><a id="__codelineno-10-1" name="__codelineno-10-1" href="#__codelineno-10-1"></a><span class="c1"># Authenticate with Google (triggers OAuth flow or uses saved token)</span>
2551
<a id="__codelineno-10-2" name="__codelineno-10-2" href="#__codelineno-10-2"></a>planopticon<span class="w"> </span>auth<span class="w"> </span>google
2552
<a id="__codelineno-10-3" name="__codelineno-10-3" href="#__codelineno-10-3"></a>
2553
<a id="__codelineno-10-4" name="__codelineno-10-4" href="#__codelineno-10-4"></a><span class="c1"># Authenticate with Zoom</span>
2554
<a id="__codelineno-10-5" name="__codelineno-10-5" href="#__codelineno-10-5"></a>planopticon<span class="w"> </span>auth<span class="w"> </span>zoom
2555
<a id="__codelineno-10-6" name="__codelineno-10-6" href="#__codelineno-10-6"></a>
2556
<a id="__codelineno-10-7" name="__codelineno-10-7" href="#__codelineno-10-7"></a><span class="c1"># Clear saved GitHub token</span>
2557
<a id="__codelineno-10-8" name="__codelineno-10-8" href="#__codelineno-10-8"></a>planopticon<span class="w"> </span>auth<span class="w"> </span>github<span class="w"> </span>--logout
2558
</code></pre></div>
2559
<p>On success, the command prints the authentication method used:</p>
2560
<div class="highlight"><pre><span></span><code><a id="__codelineno-11-1" name="__codelineno-11-1" href="#__codelineno-11-1"></a>Google authentication successful (oauth_pkce).
2561
</code></pre></div>
2562
<p>or</p>
2563
<div class="highlight"><pre><span></span><code><a id="__codelineno-12-1" name="__codelineno-12-1" href="#__codelineno-12-1"></a>Github authentication successful (api_key).
2564
</code></pre></div>
2565
<h3 id="companion-repl-auth">Companion REPL <code>/auth</code><a class="headerlink" href="#companion-repl-auth" title="Permanent link">&para;</a></h3>
2566
<p>Inside the interactive companion REPL (<code>planopticon -C</code> or <code>planopticon -I</code>), you can authenticate with services using the <code>/auth</code> command:</p>
2567
<div class="highlight"><pre><span></span><code><a id="__codelineno-13-1" name="__codelineno-13-1" href="#__codelineno-13-1"></a>/auth SERVICE
2568
</code></pre></div>
2569
<p>Without arguments, <code>/auth</code> lists all available services:</p>
2570
<div class="highlight"><pre><span></span><code><a id="__codelineno-14-1" name="__codelineno-14-1" href="#__codelineno-14-1"></a>&gt; /auth
2571
<a id="__codelineno-14-2" name="__codelineno-14-2" href="#__codelineno-14-2"></a>Usage: /auth SERVICE
2572
<a id="__codelineno-14-3" name="__codelineno-14-3" href="#__codelineno-14-3"></a>Available: dropbox, github, google, microsoft, notion, zoom
2573
</code></pre></div>
2574
<p>With a service name, it runs the same auth chain as the CLI command:</p>
2575
<div class="highlight"><pre><span></span><code><a id="__codelineno-15-1" name="__codelineno-15-1" href="#__codelineno-15-1"></a>&gt; /auth github
2576
<a id="__codelineno-15-2" name="__codelineno-15-2" href="#__codelineno-15-2"></a>Github authentication successful (api_key).
2577
</code></pre></div>
2578
<h2 id="environment-variables-reference">Environment variables reference<a class="headerlink" href="#environment-variables-reference" title="Permanent link">&para;</a></h2>
2579
<p>The following table summarizes all environment variables used by the authentication system:</p>
2580
<table>
2581
<thead>
2582
<tr>
2583
<th>Service</th>
2584
<th>OAuth Client ID</th>
2585
<th>OAuth Client Secret</th>
2586
<th>API Key / Token</th>
2587
<th>Account ID</th>
2588
</tr>
2589
</thead>
2590
<tbody>
2591
<tr>
2592
<td>Google</td>
2593
<td><code>GOOGLE_CLIENT_ID</code></td>
2594
<td><code>GOOGLE_CLIENT_SECRET</code></td>
2595
<td><code>GOOGLE_API_KEY</code></td>
2596
<td>--</td>
2597
</tr>
2598
<tr>
2599
<td>Dropbox</td>
2600
<td><code>DROPBOX_APP_KEY</code></td>
2601
<td><code>DROPBOX_APP_SECRET</code></td>
2602
<td><code>DROPBOX_ACCESS_TOKEN</code></td>
2603
<td>--</td>
2604
</tr>
2605
<tr>
2606
<td>Zoom</td>
2607
<td><code>ZOOM_CLIENT_ID</code></td>
2608
<td><code>ZOOM_CLIENT_SECRET</code></td>
2609
<td>--</td>
2610
<td><code>ZOOM_ACCOUNT_ID</code></td>
2611
</tr>
2612
<tr>
2613
<td>Notion</td>
2614
<td><code>NOTION_CLIENT_ID</code></td>
2615
<td><code>NOTION_CLIENT_SECRET</code></td>
2616
<td><code>NOTION_API_KEY</code></td>
2617
<td>--</td>
2618
</tr>
2619
<tr>
2620
<td>GitHub</td>
2621
<td><code>GITHUB_CLIENT_ID</code></td>
2622
<td><code>GITHUB_CLIENT_SECRET</code></td>
2623
<td><code>GITHUB_TOKEN</code></td>
2624
<td>--</td>
2625
</tr>
2626
<tr>
2627
<td>Microsoft</td>
2628
<td><code>MICROSOFT_CLIENT_ID</code></td>
2629
<td><code>MICROSOFT_CLIENT_SECRET</code></td>
2630
<td>--</td>
2631
<td>--</td>
2632
</tr>
2633
</tbody>
2634
</table>
2635
<h2 id="python-api">Python API<a class="headerlink" href="#python-api" title="Permanent link">&para;</a></h2>
2636
<h3 id="authconfig">AuthConfig<a class="headerlink" href="#authconfig" title="Permanent link">&para;</a></h3>
2637
<p>The <code>AuthConfig</code> dataclass defines the authentication configuration for a service. It holds OAuth endpoints, credential references, scopes, and token storage paths.</p>
2638
<div class="highlight"><pre><span></span><code><a id="__codelineno-16-1" name="__codelineno-16-1" href="#__codelineno-16-1"></a><span class="kn">from</span><span class="w"> </span><span class="nn">video_processor.auth</span><span class="w"> </span><span class="kn">import</span> <span class="n">AuthConfig</span>
2639
<a id="__codelineno-16-2" name="__codelineno-16-2" href="#__codelineno-16-2"></a>
2640
<a id="__codelineno-16-3" name="__codelineno-16-3" href="#__codelineno-16-3"></a><span class="n">config</span> <span class="o">=</span> <span class="n">AuthConfig</span><span class="p">(</span>
2641
<a id="__codelineno-16-4" name="__codelineno-16-4" href="#__codelineno-16-4"></a> <span class="n">service</span><span class="o">=</span><span class="s2">&quot;myservice&quot;</span><span class="p">,</span>
2642
<a id="__codelineno-16-5" name="__codelineno-16-5" href="#__codelineno-16-5"></a> <span class="n">oauth_authorize_url</span><span class="o">=</span><span class="s2">&quot;https://example.com/oauth/authorize&quot;</span><span class="p">,</span>
2643
<a id="__codelineno-16-6" name="__codelineno-16-6" href="#__codelineno-16-6"></a> <span class="n">oauth_token_url</span><span class="o">=</span><span class="s2">&quot;https://example.com/oauth/token&quot;</span><span class="p">,</span>
2644
<a id="__codelineno-16-7" name="__codelineno-16-7" href="#__codelineno-16-7"></a> <span class="n">client_id_env</span><span class="o">=</span><span class="s2">&quot;MYSERVICE_CLIENT_ID&quot;</span><span class="p">,</span>
2645
<a id="__codelineno-16-8" name="__codelineno-16-8" href="#__codelineno-16-8"></a> <span class="n">client_secret_env</span><span class="o">=</span><span class="s2">&quot;MYSERVICE_CLIENT_SECRET&quot;</span><span class="p">,</span>
2646
<a id="__codelineno-16-9" name="__codelineno-16-9" href="#__codelineno-16-9"></a> <span class="n">api_key_env</span><span class="o">=</span><span class="s2">&quot;MYSERVICE_API_KEY&quot;</span><span class="p">,</span>
2647
<a id="__codelineno-16-10" name="__codelineno-16-10" href="#__codelineno-16-10"></a> <span class="n">scopes</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;read&quot;</span><span class="p">,</span> <span class="s2">&quot;write&quot;</span><span class="p">],</span>
2648
<a id="__codelineno-16-11" name="__codelineno-16-11" href="#__codelineno-16-11"></a><span class="p">)</span>
2649
</code></pre></div>
2650
<p><strong>Key fields:</strong></p>
2651
<table>
2652
<thead>
2653
<tr>
2654
<th>Field</th>
2655
<th>Type</th>
2656
<th>Description</th>
2657
</tr>
2658
</thead>
2659
<tbody>
2660
<tr>
2661
<td><code>service</code></td>
2662
<td><code>str</code></td>
2663
<td>Service identifier (used for token filename)</td>
2664
</tr>
2665
<tr>
2666
<td><code>oauth_authorize_url</code></td>
2667
<td><code>Optional[str]</code></td>
2668
<td>OAuth authorization endpoint</td>
2669
</tr>
2670
<tr>
2671
<td><code>oauth_token_url</code></td>
2672
<td><code>Optional[str]</code></td>
2673
<td>OAuth token endpoint</td>
2674
</tr>
2675
<tr>
2676
<td><code>client_id</code> / <code>client_id_env</code></td>
2677
<td><code>Optional[str]</code></td>
2678
<td>Client ID value or env var name</td>
2679
</tr>
2680
<tr>
2681
<td><code>client_secret</code> / <code>client_secret_env</code></td>
2682
<td><code>Optional[str]</code></td>
2683
<td>Client secret value or env var name</td>
2684
</tr>
2685
<tr>
2686
<td><code>api_key_env</code></td>
2687
<td><code>Optional[str]</code></td>
2688
<td>Environment variable for API key fallback</td>
2689
</tr>
2690
<tr>
2691
<td><code>scopes</code></td>
2692
<td><code>List[str]</code></td>
2693
<td>OAuth scopes to request</td>
2694
</tr>
2695
<tr>
2696
<td><code>redirect_uri</code></td>
2697
<td><code>str</code></td>
2698
<td>Redirect URI (default: <code>urn:ietf:wg:oauth:2.0:oob</code>)</td>
2699
</tr>
2700
<tr>
2701
<td><code>account_id</code> / <code>account_id_env</code></td>
2702
<td><code>Optional[str]</code></td>
2703
<td>Account ID for client credentials grant</td>
2704
</tr>
2705
<tr>
2706
<td><code>token_path</code></td>
2707
<td><code>Optional[Path]</code></td>
2708
<td>Override token storage path</td>
2709
</tr>
2710
</tbody>
2711
</table>
2712
<p><strong>Resolved properties:</strong></p>
2713
<ul>
2714
<li><code>resolved_client_id</code> -- Returns the client ID from the direct value or environment variable.</li>
2715
<li><code>resolved_client_secret</code> -- Returns the client secret from the direct value or environment variable.</li>
2716
<li><code>resolved_api_key</code> -- Returns the API key from the environment variable.</li>
2717
<li><code>resolved_account_id</code> -- Returns the account ID from the direct value or environment variable.</li>
2718
<li><code>resolved_token_path</code> -- Returns the token file path (default: <code>~/.planopticon/{service}_token.json</code>).</li>
2719
<li><code>supports_oauth</code> -- Returns <code>True</code> if both OAuth endpoints are configured.</li>
2720
</ul>
2721
<h3 id="oauthmanager">OAuthManager<a class="headerlink" href="#oauthmanager" title="Permanent link">&para;</a></h3>
2722
<p>The <code>OAuthManager</code> class manages the full authentication lifecycle for a service.</p>
2723
<div class="highlight"><pre><span></span><code><a id="__codelineno-17-1" name="__codelineno-17-1" href="#__codelineno-17-1"></a><span class="kn">from</span><span class="w"> </span><span class="nn">video_processor.auth</span><span class="w"> </span><span class="kn">import</span> <span class="n">OAuthManager</span><span class="p">,</span> <span class="n">AuthConfig</span>
2724
<a id="__codelineno-17-2" name="__codelineno-17-2" href="#__codelineno-17-2"></a>
2725
<a id="__codelineno-17-3" name="__codelineno-17-3" href="#__codelineno-17-3"></a><span class="n">config</span> <span class="o">=</span> <span class="n">AuthConfig</span><span class="p">(</span>
2726
<a id="__codelineno-17-4" name="__codelineno-17-4" href="#__codelineno-17-4"></a> <span class="n">service</span><span class="o">=</span><span class="s2">&quot;notion&quot;</span><span class="p">,</span>
2727
<a id="__codelineno-17-5" name="__codelineno-17-5" href="#__codelineno-17-5"></a> <span class="n">oauth_authorize_url</span><span class="o">=</span><span class="s2">&quot;https://api.notion.com/v1/oauth/authorize&quot;</span><span class="p">,</span>
2728
<a id="__codelineno-17-6" name="__codelineno-17-6" href="#__codelineno-17-6"></a> <span class="n">oauth_token_url</span><span class="o">=</span><span class="s2">&quot;https://api.notion.com/v1/oauth/token&quot;</span><span class="p">,</span>
2729
<a id="__codelineno-17-7" name="__codelineno-17-7" href="#__codelineno-17-7"></a> <span class="n">client_id_env</span><span class="o">=</span><span class="s2">&quot;NOTION_CLIENT_ID&quot;</span><span class="p">,</span>
2730
<a id="__codelineno-17-8" name="__codelineno-17-8" href="#__codelineno-17-8"></a> <span class="n">client_secret_env</span><span class="o">=</span><span class="s2">&quot;NOTION_CLIENT_SECRET&quot;</span><span class="p">,</span>
2731
<a id="__codelineno-17-9" name="__codelineno-17-9" href="#__codelineno-17-9"></a> <span class="n">api_key_env</span><span class="o">=</span><span class="s2">&quot;NOTION_API_KEY&quot;</span><span class="p">,</span>
2732
<a id="__codelineno-17-10" name="__codelineno-17-10" href="#__codelineno-17-10"></a> <span class="n">scopes</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;read_content&quot;</span><span class="p">],</span>
2733
<a id="__codelineno-17-11" name="__codelineno-17-11" href="#__codelineno-17-11"></a><span class="p">)</span>
2734
<a id="__codelineno-17-12" name="__codelineno-17-12" href="#__codelineno-17-12"></a><span class="n">manager</span> <span class="o">=</span> <span class="n">OAuthManager</span><span class="p">(</span><span class="n">config</span><span class="p">)</span>
2735
<a id="__codelineno-17-13" name="__codelineno-17-13" href="#__codelineno-17-13"></a>
2736
<a id="__codelineno-17-14" name="__codelineno-17-14" href="#__codelineno-17-14"></a><span class="c1"># Full auth chain -- returns AuthResult</span>
2737
<a id="__codelineno-17-15" name="__codelineno-17-15" href="#__codelineno-17-15"></a><span class="n">result</span> <span class="o">=</span> <span class="n">manager</span><span class="o">.</span><span class="n">authenticate</span><span class="p">()</span>
2738
<a id="__codelineno-17-16" name="__codelineno-17-16" href="#__codelineno-17-16"></a><span class="k">if</span> <span class="n">result</span><span class="o">.</span><span class="n">success</span><span class="p">:</span>
2739
<a id="__codelineno-17-17" name="__codelineno-17-17" href="#__codelineno-17-17"></a> <span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Authenticated via </span><span class="si">{</span><span class="n">result</span><span class="o">.</span><span class="n">method</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
2740
<a id="__codelineno-17-18" name="__codelineno-17-18" href="#__codelineno-17-18"></a> <span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Token: </span><span class="si">{</span><span class="n">result</span><span class="o">.</span><span class="n">access_token</span><span class="p">[:</span><span class="mi">20</span><span class="p">]</span><span class="si">}</span><span class="s2">...&quot;</span><span class="p">)</span>
2741
<a id="__codelineno-17-19" name="__codelineno-17-19" href="#__codelineno-17-19"></a>
2742
<a id="__codelineno-17-20" name="__codelineno-17-20" href="#__codelineno-17-20"></a><span class="c1"># Convenience method -- returns just the token string or None</span>
2743
<a id="__codelineno-17-21" name="__codelineno-17-21" href="#__codelineno-17-21"></a><span class="n">token</span> <span class="o">=</span> <span class="n">manager</span><span class="o">.</span><span class="n">get_token</span><span class="p">()</span>
2744
<a id="__codelineno-17-22" name="__codelineno-17-22" href="#__codelineno-17-22"></a>
2745
<a id="__codelineno-17-23" name="__codelineno-17-23" href="#__codelineno-17-23"></a><span class="c1"># Clear saved token (logout)</span>
2746
<a id="__codelineno-17-24" name="__codelineno-17-24" href="#__codelineno-17-24"></a><span class="n">manager</span><span class="o">.</span><span class="n">clear_token</span><span class="p">()</span>
2747
</code></pre></div>
2748
<p><strong>AuthResult fields:</strong></p>
2749
<table>
2750
<thead>
2751
<tr>
2752
<th>Field</th>
2753
<th>Type</th>
2754
<th>Description</th>
2755
</tr>
2756
</thead>
2757
<tbody>
2758
<tr>
2759
<td><code>success</code></td>
2760
<td><code>bool</code></td>
2761
<td>Whether authentication succeeded</td>
2762
</tr>
2763
<tr>
2764
<td><code>access_token</code></td>
2765
<td><code>Optional[str]</code></td>
2766
<td>The access token (if successful)</td>
2767
</tr>
2768
<tr>
2769
<td><code>method</code></td>
2770
<td><code>Optional[str]</code></td>
2771
<td>One of: <code>saved_token</code>, <code>oauth_pkce</code>, <code>client_credentials</code>, <code>api_key</code></td>
2772
</tr>
2773
<tr>
2774
<td><code>expires_at</code></td>
2775
<td><code>Optional[float]</code></td>
2776
<td>Token expiry as a Unix timestamp</td>
2777
</tr>
2778
<tr>
2779
<td><code>refresh_token</code></td>
2780
<td><code>Optional[str]</code></td>
2781
<td>Refresh token (if provided)</td>
2782
</tr>
2783
<tr>
2784
<td><code>error</code></td>
2785
<td><code>Optional[str]</code></td>
2786
<td>Error message (if unsuccessful)</td>
2787
</tr>
2788
</tbody>
2789
</table>
2790
<h3 id="pre-built-configs">Pre-built configs<a class="headerlink" href="#pre-built-configs" title="Permanent link">&para;</a></h3>
2791
<p>PlanOpticon ships with pre-built <code>AuthConfig</code> instances for all six supported services. Access them via convenience functions:</p>
2792
<div class="highlight"><pre><span></span><code><a id="__codelineno-18-1" name="__codelineno-18-1" href="#__codelineno-18-1"></a><span class="kn">from</span><span class="w"> </span><span class="nn">video_processor.auth</span><span class="w"> </span><span class="kn">import</span> <span class="n">get_auth_config</span><span class="p">,</span> <span class="n">get_auth_manager</span>
2793
<a id="__codelineno-18-2" name="__codelineno-18-2" href="#__codelineno-18-2"></a>
2794
<a id="__codelineno-18-3" name="__codelineno-18-3" href="#__codelineno-18-3"></a><span class="c1"># Get just the config</span>
2795
<a id="__codelineno-18-4" name="__codelineno-18-4" href="#__codelineno-18-4"></a><span class="n">config</span> <span class="o">=</span> <span class="n">get_auth_config</span><span class="p">(</span><span class="s2">&quot;zoom&quot;</span><span class="p">)</span>
2796
<a id="__codelineno-18-5" name="__codelineno-18-5" href="#__codelineno-18-5"></a>
2797
<a id="__codelineno-18-6" name="__codelineno-18-6" href="#__codelineno-18-6"></a><span class="c1"># Get a ready-to-use manager</span>
2798
<a id="__codelineno-18-7" name="__codelineno-18-7" href="#__codelineno-18-7"></a><span class="n">manager</span> <span class="o">=</span> <span class="n">get_auth_manager</span><span class="p">(</span><span class="s2">&quot;github&quot;</span><span class="p">)</span>
2799
<a id="__codelineno-18-8" name="__codelineno-18-8" href="#__codelineno-18-8"></a><span class="n">token</span> <span class="o">=</span> <span class="n">manager</span><span class="o">.</span><span class="n">get_token</span><span class="p">()</span>
2800
</code></pre></div>
2801
<h3 id="building-custom-connectors">Building custom connectors<a class="headerlink" href="#building-custom-connectors" title="Permanent link">&para;</a></h3>
2802
<p>To add authentication for a new service, create an <code>AuthConfig</code> with the service's OAuth endpoints and credential environment variables:</p>
2803
<div class="highlight"><pre><span></span><code><a id="__codelineno-19-1" name="__codelineno-19-1" href="#__codelineno-19-1"></a><span class="kn">from</span><span class="w"> </span><span class="nn">video_processor.auth</span><span class="w"> </span><span class="kn">import</span> <span class="n">AuthConfig</span><span class="p">,</span> <span class="n">OAuthManager</span>
2804
<a id="__codelineno-19-2" name="__codelineno-19-2" href="#__codelineno-19-2"></a>
2805
<a id="__codelineno-19-3" name="__codelineno-19-3" href="#__codelineno-19-3"></a><span class="n">config</span> <span class="o">=</span> <span class="n">AuthConfig</span><span class="p">(</span>
2806
<a id="__codelineno-19-4" name="__codelineno-19-4" href="#__codelineno-19-4"></a> <span class="n">service</span><span class="o">=</span><span class="s2">&quot;slack&quot;</span><span class="p">,</span>
2807
<a id="__codelineno-19-5" name="__codelineno-19-5" href="#__codelineno-19-5"></a> <span class="n">oauth_authorize_url</span><span class="o">=</span><span class="s2">&quot;https://slack.com/oauth/v2/authorize&quot;</span><span class="p">,</span>
2808
<a id="__codelineno-19-6" name="__codelineno-19-6" href="#__codelineno-19-6"></a> <span class="n">oauth_token_url</span><span class="o">=</span><span class="s2">&quot;https://slack.com/api/oauth.v2.access&quot;</span><span class="p">,</span>
2809
<a id="__codelineno-19-7" name="__codelineno-19-7" href="#__codelineno-19-7"></a> <span class="n">client_id_env</span><span class="o">=</span><span class="s2">&quot;SLACK_CLIENT_ID&quot;</span><span class="p">,</span>
2810
<a id="__codelineno-19-8" name="__codelineno-19-8" href="#__codelineno-19-8"></a> <span class="n">client_secret_env</span><span class="o">=</span><span class="s2">&quot;SLACK_CLIENT_SECRET&quot;</span><span class="p">,</span>
2811
<a id="__codelineno-19-9" name="__codelineno-19-9" href="#__codelineno-19-9"></a> <span class="n">api_key_env</span><span class="o">=</span><span class="s2">&quot;SLACK_BOT_TOKEN&quot;</span><span class="p">,</span>
2812
<a id="__codelineno-19-10" name="__codelineno-19-10" href="#__codelineno-19-10"></a> <span class="n">scopes</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;channels:read&quot;</span><span class="p">,</span> <span class="s2">&quot;channels:history&quot;</span><span class="p">],</span>
2813
<a id="__codelineno-19-11" name="__codelineno-19-11" href="#__codelineno-19-11"></a><span class="p">)</span>
2814
<a id="__codelineno-19-12" name="__codelineno-19-12" href="#__codelineno-19-12"></a>
2815
<a id="__codelineno-19-13" name="__codelineno-19-13" href="#__codelineno-19-13"></a><span class="n">manager</span> <span class="o">=</span> <span class="n">OAuthManager</span><span class="p">(</span><span class="n">config</span><span class="p">)</span>
2816
<a id="__codelineno-19-14" name="__codelineno-19-14" href="#__codelineno-19-14"></a><span class="n">result</span> <span class="o">=</span> <span class="n">manager</span><span class="o">.</span><span class="n">authenticate</span><span class="p">()</span>
2817
</code></pre></div>
2818
<p>The token will be saved to <code>~/.planopticon/slack_token.json</code> and automatically refreshed on subsequent calls.</p>
2819
<h2 id="troubleshooting">Troubleshooting<a class="headerlink" href="#troubleshooting" title="Permanent link">&para;</a></h2>
2820
<h3 id="no-auth-method-available-for-service">"No auth method available for {service}"<a class="headerlink" href="#no-auth-method-available-for-service" title="Permanent link">&para;</a></h3>
2821
<p>This means none of the four auth methods succeeded. Check that:</p>
2822
<ul>
2823
<li>The required environment variables are set and non-empty.</li>
2824
<li>For OAuth: both the client ID and client secret (or app key/secret) are set.</li>
2825
<li>For API key fallback: the correct environment variable is set.</li>
2826
</ul>
2827
<p>The error message includes hints about which variables to set.</p>
2828
<h3 id="token-refresh-fails">Token refresh fails<a class="headerlink" href="#token-refresh-fails" title="Permanent link">&para;</a></h3>
2829
<p>If automatic token refresh fails, PlanOpticon falls back to the next auth method in the chain. Common causes:</p>
2830
<ul>
2831
<li>The refresh token has been revoked (e.g., you changed your password or revoked app access).</li>
2832
<li>The OAuth app's client secret has changed.</li>
2833
<li>The service requires re-authorization after a certain period.</li>
2834
</ul>
2835
<p>To resolve, clear the token and re-authenticate:</p>
2836
<div class="highlight"><pre><span></span><code><a id="__codelineno-20-1" name="__codelineno-20-1" href="#__codelineno-20-1"></a>planopticon<span class="w"> </span>auth<span class="w"> </span>google<span class="w"> </span>--logout
2837
<a id="__codelineno-20-2" name="__codelineno-20-2" href="#__codelineno-20-2"></a>planopticon<span class="w"> </span>auth<span class="w"> </span>google
2838
</code></pre></div>
2839
<h3 id="oauth-pkce-flow-does-not-open-a-browser">OAuth PKCE flow does not open a browser<a class="headerlink" href="#oauth-pkce-flow-does-not-open-a-browser" title="Permanent link">&para;</a></h3>
2840
<p>If the browser does not open automatically, PlanOpticon prints the authorization URL to the terminal. Copy and paste it into your browser manually. After authorizing, paste the authorization code back into the terminal prompt.</p>
2841
<h3 id="requests-not-installed">"requests not installed"<a class="headerlink" href="#requests-not-installed" title="Permanent link">&para;</a></h3>
2842
<p>The OAuth flows require the <code>requests</code> library. It is included as a dependency of PlanOpticon, but if you installed PlanOpticon in a minimal environment, install it manually:</p>
2843
<div class="highlight"><pre><span></span><code><a id="__codelineno-21-1" name="__codelineno-21-1" href="#__codelineno-21-1"></a>pip<span class="w"> </span>install<span class="w"> </span>requests
2844
</code></pre></div>
2845
<h3 id="permission-denied-on-token-file">Permission denied on token file<a class="headerlink" href="#permission-denied-on-token-file" title="Permanent link">&para;</a></h3>
2846
<p>PlanOpticon needs write access to <code>~/.planopticon/</code>. If the directory or token files have restrictive permissions, adjust them:</p>
2847
<div class="highlight"><pre><span></span><code><a id="__codelineno-22-1" name="__codelineno-22-1" href="#__codelineno-22-1"></a>chmod<span class="w"> </span><span class="m">700</span><span class="w"> </span>~/.planopticon
2848
<a id="__codelineno-22-2" name="__codelineno-22-2" href="#__codelineno-22-2"></a>chmod<span class="w"> </span><span class="m">600</span><span class="w"> </span>~/.planopticon/*_token.json
2849
</code></pre></div>
2850
<h3 id="microsoft-authentication-uses-the-common-tenant">Microsoft authentication uses the <code>/common</code> tenant<a class="headerlink" href="#microsoft-authentication-uses-the-common-tenant" title="Permanent link">&para;</a></h3>
2851
<p>The default Microsoft OAuth configuration uses the <code>common</code> tenant endpoint (<code>login.microsoftonline.com/common/...</code>), which supports both personal Microsoft accounts and Azure AD organizational accounts. If your organization requires a specific tenant, you can create a custom <code>AuthConfig</code> with the tenant-specific URLs.</p>
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
</article>
2866
</div>
2867
2868
2869
<script>var tabs=__md_get("__tabs");if(Array.isArray(tabs))e:for(var set of document.querySelectorAll(".tabbed-set")){var labels=set.querySelector(".tabbed-labels");for(var tab of tabs)for(var label of labels.getElementsByTagName("label"))if(label.innerText.trim()===tab){var input=document.getElementById(label.htmlFor);input.checked=!0;continue e}}</script>
2870
2871
<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
2872
</div>
2873
2874
<button type="button" class="md-top md-icon" data-md-component="top" hidden>
2875
2876
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg>
2877
Back to top
2878
</button>
2879
2880
</main>
2881
2882
<footer class="md-footer">
2883
2884
<div class="md-footer-meta md-typeset">
2885
<div class="md-footer-meta__inner md-grid">
2886
<div class="md-copyright">
2887
2888
<div class="md-copyright__highlight">
2889
Copyright &copy; 2026 CONFLICT LLC
2890
</div>
2891
2892
2893
Made with
2894
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
2895
Material for MkDocs
2896
</a>
2897
2898
</div>
2899
2900
2901
<div class="md-social">
2902
2903
2904
2905
2906
2907
2908
2909
2910
<a href="https://github.com/ConflictHQ/PlanOpticon" target="_blank" rel="noopener" title="github.com" class="md-social__link">
2911
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M173.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M252.8 8C114.1 8 8 113.3 8 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C436.2 457.8 504 362.9 504 252 504 113.3 391.5 8 252.8 8M105.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1m-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7m32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2"/></svg>
2912
</a>
2913
2914
</div>
2915
2916
</div>
2917
</div>
2918
</footer>
2919
2920
</div>
2921
<div class="md-dialog" data-md-component="dialog">
2922
<div class="md-dialog__inner md-typeset"></div>
2923
</div>
2924
2925
2926
2927
2928
2929
<script id="__config" type="application/json">{"annotate": null, "base": "../..", "features": ["navigation.instant", "navigation.tabs", "navigation.sections", "navigation.expand", "navigation.top", "search.suggest", "search.highlight", "content.code.copy", "content.tabs.link", "header.autohide"], "search": "../../assets/javascripts/workers/search.2c215733.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script>
2930
2931
2932
<script src="../../assets/javascripts/bundle.79ae519e.min.js"></script>
2933
2934
2935
</body>
2936
</html>

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button