johnjohntheleprechaun / oceanic

https://oceanic.leprechaun.dev/
GNU Affero General Public License v3.0
1 stars 0 forks source link

attemptCall doesn't properly refresh tokens #5

Closed johnjohntheleprechaun closed 1 year ago

johnjohntheleprechaun commented 1 year ago

Had the homepage open, waited an hour (for credentials and access token to expire). Then I opened a journal. When the journal tried to load, it attempted to fetch twice (as it should) but failed both times. Had to reload the page to get it to load the journal

johnjohntheleprechaun commented 1 year ago

Looks like I should just need to add an await before the refresh_token() call

johnjohntheleprechaun commented 1 year ago

It actually does refresh the tokens, the issue is that it doesn't update the credentials. I'll need to add a util function for that

johnjohntheleprechaun commented 1 year ago

IT WAS THE PROMISE SYNTAX!!!!

I need to rewrite my code to work with promises. this will require an entire new branch :/

johnjohntheleprechaun commented 1 year ago

fixed in branch multiple-users. will be merged with dev later