fix(astrolabe): rename OAuthController and fix app password check

- Rename OAuthController.php to OauthController.php for consistency
- Fix Personal.php to check specifically for app password presence
  using getBackgroundSyncPassword() instead of hasBackgroundSyncAccess()
  for hybrid auth mode

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Chris Coutinho
2026-01-24 13:04:23 +01:00
parent 0b6a6b0842
commit c5bf4cda8a
2 changed files with 4 additions and 2 deletions
@@ -32,7 +32,7 @@ use Psr\Log\LoggerInterface;
* - Public clients: PKCE only
* - Confidential clients: PKCE + client_secret (defense in depth)
*/
class OAuthController extends Controller {
class OauthController extends Controller {
private IConfig $config;
private ISession $session;
private IUserSession $userSession;
+3 -1
View File
@@ -86,7 +86,9 @@ class Personal implements ISettings {
if ($authMode === 'multi_user_basic' && $supportsAppPasswords) {
// Check both credentials
$hasOAuthToken = ($token !== null && !$this->tokenStorage->isExpired($token));
$hasAppPassword = $this->tokenStorage->hasBackgroundSyncAccess($userId);
// In hybrid mode, check specifically for app password (not general background access)
// because MCP server needs the app password for background sync
$hasAppPassword = ($this->tokenStorage->getBackgroundSyncPassword($userId) !== null);
$backgroundSyncType = $this->tokenStorage->getBackgroundSyncType($userId);
$backgroundSyncProvisionedAt = $this->tokenStorage->getBackgroundSyncProvisionedAt($userId);