[PR #13642] [CLOSED] auth: add local sign-in state caching #76603

Closed
opened 2026-05-05 09:14:24 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/13642
Author: @ParthSareen
Created: 1/8/2026
Status: Closed

Base: mainHead: parth/signed-in-offline


📝 Commits (5)

  • eed58a3 auth: add local sign-in state storage
  • 528de77 server: use local cache for sign-in status
  • f4e5978 auth: add tests for sign-in state functions
  • 106640b auth: fix lint and formatting issues
  • b978dc2 auth: fix tests for Windows compatibility

📊 Changes

4 files changed (+746 additions, -1 deletions)

View changed files

📝 auth/auth.go (+85 -1)
auth/signin_flow_test.go (+294 -0)
auth/signin_state_test.go (+347 -0)
📝 server/routes.go (+20 -0)

📄 Description

Add local sign-in state caching

Stores sign-in state locally at ~/.ollama/signin.json so we can check if a user is signed in without hitting ollama.com.

Changes

  • WhoamiHandler checks local cache first, only calls network if no cache exists
  • Successful sign-ins are cached locally
  • SignoutHandler clears local cache

Behavior

Scenario Result
Offline + cached Works, uses cache
Offline + no cache Not signed in
Sign out Clears local + remote

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/13642 **Author:** [@ParthSareen](https://github.com/ParthSareen) **Created:** 1/8/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `parth/signed-in-offline` --- ### 📝 Commits (5) - [`eed58a3`](https://github.com/ollama/ollama/commit/eed58a312d26cb5932e0fc0de2316d839d061273) auth: add local sign-in state storage - [`528de77`](https://github.com/ollama/ollama/commit/528de77b4bae68a8d8f89c4bec3f321badb17408) server: use local cache for sign-in status - [`f4e5978`](https://github.com/ollama/ollama/commit/f4e5978e4f6a2a7fee9f159baa58afcad933e57d) auth: add tests for sign-in state functions - [`106640b`](https://github.com/ollama/ollama/commit/106640b978688d6eff299e54474678bf1703f65c) auth: fix lint and formatting issues - [`b978dc2`](https://github.com/ollama/ollama/commit/b978dc28d2054ec1b06d4f9375655865f319e42a) auth: fix tests for Windows compatibility ### 📊 Changes **4 files changed** (+746 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `auth/auth.go` (+85 -1) ➕ `auth/signin_flow_test.go` (+294 -0) ➕ `auth/signin_state_test.go` (+347 -0) 📝 `server/routes.go` (+20 -0) </details> ### 📄 Description Add local sign-in state caching Stores sign-in state locally at ~/.ollama/signin.json so we can check if a user is signed in without hitting ollama.com. ## Changes - WhoamiHandler checks local cache first, only calls network if no cache exists - Successful sign-ins are cached locally - SignoutHandler clears local cache Behavior | Scenario | Result | |--------------------|-----------------------| | Offline + cached | Works, uses cache | | Offline + no cache | Not signed in | | Sign out | Clears local + remote | --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-05 09:14:24 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#76603