Several connected google accounts #104

Open
opened 2026-02-28 01:28:29 -05:00 by deekerman · 1 comment
Owner

Originally created by @vanadium23 on GitHub (Aug 9, 2025).

I encounter bug with two calendar.
Steps to reproduce:

  1. connect two google accounts
  2. choose one calendar from first and one from second
  3. sync both

Only one calendar is show.

Sync is good, in database there are events for both feeds:

 select distinct "feedId", count(*) from "CalendarEvent" group by 1;
┌──────────────────────────────────────┬───────┐
│                feedId                │ count │
├──────────────────────────────────────┼───────┤
│ 011058e0-02a8-4408-a505-80c9a81c328e │   250 │
│ dabdad61-438c-4561-affd-ca1223c91e59 │   220 │
└──────────────────────────────────────┴───────┘
Image
Originally created by @vanadium23 on GitHub (Aug 9, 2025). I encounter bug with two calendar. Steps to reproduce: 1. connect two google accounts 2. choose one calendar from first and one from second 3. sync both Only one calendar is show. Sync is good, in database there are events for both feeds: ``` select distinct "feedId", count(*) from "CalendarEvent" group by 1; ┌──────────────────────────────────────┬───────┐ │ feedId │ count │ ├──────────────────────────────────────┼───────┤ │ 011058e0-02a8-4408-a505-80c9a81c328e │ 250 │ │ dabdad61-438c-4561-affd-ca1223c91e59 │ 220 │ └──────────────────────────────────────┴───────┘ ``` <img width="806" height="620" alt="Image" src="https://github.com/user-attachments/assets/d8f915e6-78d6-4d09-84ad-167d7174e22e" />
Author
Owner

@vanadium23 commented on GitHub (Aug 11, 2025):

The issue is most likely that when you connect a second Google account, if it uses the same email address as an existing connected account, the unique constraint @@unique([userId, provider, email]) causes the system to update the existing account record instead of creating a new one. This overwrites the first account's tokens and breaks the connection to the first account's calendars.

@vanadium23 commented on GitHub (Aug 11, 2025): The issue is most likely that when you connect a second Google account, if it uses the same email address as an existing connected account, the unique constraint @@unique([userId, provider, email]) causes the system to update the existing account record instead of creating a new one. This overwrites the first account's tokens and breaks the connection to the first account's calendars.
Sign in to join this conversation.
No labels
enhancement
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/fluid-calendar#104
No description provided.