Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does issuing a new Github OAUTH token expire all previous ones?

I've got an app written entirely in Javascript that uses the Github API extensively. The thing is if you open it up in two browsers (say Chrome and Firefox) and login as the same user, the second browser's OAUTH token now becomes the latest token - the token in the first browser stops working immediately.

Is this expected behaviour? Is it possible to let tokens live on even after new ones are issued for a user? Or do I need to provide some kind of token store on my server for each user and keep pulling / pushing the latest token to all current clients?

In other words, what the best way to maintain OAuth tokens for multiple clients of a single application?

like image 603
Sudhir Jonathan Avatar asked Nov 13 '22 07:11

Sudhir Jonathan


1 Answers

Is this expected behaviour? Is it possible to let tokens live on even after new ones are issued for a user? Or do I need to provide some kind of token store on my server for each user and keep pulling / pushing the latest token to all current clients?

Yes, I would suggest pulling this functionality into an api and storing tokens server side and providing a json api. Like I do with tastyrepo.com

like image 184
MatthewFord Avatar answered Jan 05 '23 23:01

MatthewFord