Closed mspych closed 1 year ago
Thank you for opening this issue!
🔔 @danpalmer you might want to have a look.
Thanks will take another look. I've heard a similar report but not managed to reproduce in development and the stacktrace from prod builds didn't yield anything clear.
hey @danpalmer did you have a chance to look into this issue? I can send the logs if helpful.
This issue has been automatically marked as stale because it did not have any recent activity.
It will be closed if no further activity occurs in the next 10 days to keep our backlog clean 😊
Thanks @raycastbot for the ping. I've done some more investigation here. I can reproduce this issue, it seems to be that refresh tokens stop working correctly after a while.
I noticed this code in the refresh function:
const tokenResponse = (await response.json()) as OAuth.TokenResponse;
tokenResponse.refresh_token = tokenResponse.refresh_token ?? refreshToken;
return tokenResponse;
Line 2 defaults the refresh token to the old refresh token. The Monzo docs aren't clear, but I suspect this is not allowed, and causes refresh tokens to get out of step, and therefore invalid.
I'm going to try removing this line and see if it works. I'll re-test over the next few days and submit a fix if it's all ok.
This issue has been automatically marked as stale because it did not have any recent activity.
It will be closed if no further activity occurs in the next 10 days to keep our backlog clean 😊
This issue has been automatically closed due to inactivity.
Feel free to comment in the thread when you're ready to continue working on it 🙂
You can also catch us in Slack if you want to discuss this.
I actually fixed this in the end, should be all working.
Extension
https://www.raycast.com/danpalmer/monzo
Description
After initially connecting the extension stopped working. No transaction are showing.
Steps To Reproduce
Launch the extension
Current Behaviour
Failed to fetch latest data error is returned
Expected Behaviour
Transactions should be pulled