Reputation: 498
For a desktop application, how can I get the access token by participating directly in the OAuth flows.
I don't want the user to go through browser and provide me the access token.
Secondly, how can I know what are the users the application is authorized by and how the application can know if it is authorized by somebody and what is the access token for the same ?
Upvotes: 0
Views: 106
Reputation: 22296
"how can I get the access token by participating directly in the OAuth flows."
By storing a refresh token in your server
Secondly, how can I know what are the users the application is authorized by
The user can only authorize your app with your app's involvement. So you simply need to store a each authed user in a list
and how the application can know if it is authorized by somebody and what is the access token for the same ?
By attempting to do an auth with force-approval = false; If he is authed, you'll get an access token. If he isn't, he'll be prompted for auth.
Upvotes: 1