h3poteto / whalebird-desktop

Single-column Fediverse client for desktop
https://whalebird.social
GNU General Public License v3.0
900 stars 82 forks source link

Handle refresh token and refresh before expire the access token #859

Open h3poteto opened 5 years ago

h3poteto commented 5 years ago

Describe

Save refresh token when authorize, and it will be used refresh when expire the access token.

Why

Now I don't care the refresh token: https://github.com/h3poteto/whalebird-desktop/blob/master/src/main/auth.js#L79

But in the future the refresh token will be implemented.

h3poteto commented 5 years ago

Doorkeeper returns expires_in when you get the access token. https://github.com/doorkeeper-gem/doorkeeper/wiki/API-endpoint-descriptions-and-examples#command-output-3 And refresh_token has already saved.

h3poteto commented 5 years ago

Now Whalebird can refresh the token when launch application. But if the token expire while user is using application, user have to restart it. This case has not been handled yet.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. You can remove the stale label with /remove-stale comment. Thank you for your contributions.

h3poteto commented 2 years ago

/remove-stale

stale[bot] commented 2 years ago

/remove-stale

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. You can remove the stale label with /remove-stale comment. Thank you for your contributions.

stale[bot] commented 2 years ago

/remove-stale