axieum / authme

:lock: Authenticate yourself in Minecraft and re-validate your session
https://www.curseforge.com/minecraft/mc-mods/auth-me
MIT License
92 stars 34 forks source link

Added refresh token to acquireMSAuth #123

Open GaMeNu opened 2 months ago

GaMeNu commented 2 months ago

Gave the MSUtils class the ability to store a Microsoft refresh token. This should fix Issue #122, by using the refresh token to refresh the session after invalidation.

The MSUtils class will now grab the refresh token from the access token JSON, and store it in a static var. After the next login, it will use the refresh token instead of asking for authorization again.

axieum commented 1 month ago

Hi @GaMeNu 👋

It's been a couple weeks now. I assume you have been using your build of the mod for a while. Has this change fixed your issue?

Thanks,

GaMeNu commented 1 month ago

Hey, sorry for the late reply. The new build seems to work fine after the first log-in using the mod (don't know how to fix for before first log in, since the mod can't get a refresh nor an access token beforehand atm).