-
Notifications
You must be signed in to change notification settings - Fork 277
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
🔍 Is there already an issue for your problem?
- I have checked older issues, open and closed
📝 Description
When using multiple accounts and notifications span multiple pages, a token that is not associated with the account and server is used.
I believe this is likely due to using axios.defaults for passing authentication credentials, resulting in the following behavior:
Fetch notifications for Account 1 (Token 1 is set in authentication credentials)
Fetch notifications for Account 2 (Token 2 is set in authentication credentials)
Fetch page 2 of notifications for Account 1 (Token 2 is used because it's not reset during pagination)
https://github.com/gitify-app/gitify/blob/main/src/renderer/utils/api/request.ts#L57
🪜 Steps To Reproduce
- Add two accounts
- Have Account 1's notifications reach the second page
- Disabling "Fetch all notifications" prevents the error from occurring
🪵 Log Excerpts
GET https://api.github.com/notifications?participating=false&page=2 401 (Unauthorized)
Gitify Version
6.6.0
Operating System
macOS
GitHub Account
Combination
📸 Screenshots
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working