summaryrefslogtreecommitdiffstats
path: root/fikenauth/lock_other.go
diff options
context:
space:
mode:
authorSimen A. W. Olsen <hello@simenandre.no>2026-11-03 22:08:49 +0100
committerSimen A. W. Olsen <hello@simenandre.no>2026-11-03 22:08:49 +0100
commitbef3ccf4521d4ed431f3cdfc66e618c619ce28e4 (patch)
treeef8e6ff90fed4b27d4f2cfd082106f2efdb38ca5 /fikenauth/lock_other.go
parenta5491c9dccdf4678bf3b4380d208cf2562afeee4 (diff)
downloadfiken-43dc4f31b0d28b817cf74c2e91c5f31471214349.tar.gz
fiken-43dc4f31b0d28b817cf74c2e91c5f31471214349.zip
Share one Fiken login between programsHEADv0.4.0main
fikenconfig keeps an OAuth app and a grant per account in ~/.config/fiken, and finds the account that reaches a company. Renewing a grant takes a lock, so programs sharing it take turns.
Diffstat (limited to 'fikenauth/lock_other.go')
-rw-r--r--fikenauth/lock_other.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/fikenauth/lock_other.go b/fikenauth/lock_other.go
new file mode 100644
index 0000000..b6c6075
--- /dev/null
+++ b/fikenauth/lock_other.go
@@ -0,0 +1,7 @@
+//go:build !unix
+
+package fikenauth
+
+// lock is a no-op where flock does not exist; two programs renewing one grant
+// at the same moment can then still log each other out.
+func (s *Store) lock() (unlock func(), err error) { return func() {}, nil }