Github Oauth App doesnot show Auth Screen if we have already authorized . But Newly Added Org are not visible via Old AccessToken

Viewed 5

Here is my scenario

i have created an Github Oauth App and below are the steps performed

  1. I completed oauth flow via URL https://github.com/login/oauth/authorize client_id=XXXXXXXXXX&scope=repo,read:org And then i grant the access to existing organisation named firstOrg and i got access_token.

  2. When i use github api using access token from step 1 to get list of organisations . I see firstOrg in the response

  3. Now after some time, i added new organisation under same github account called secondorg .

Issues:

  1. Now when i try to get the list of organisations using the same access token ,i see only firstorg in the response and i don't secondorg in the response
  2. If i try to re-authorize the oauth flow via same url i.e https://github.com/login/oauth/authorize client_id=XXXXXXXXXX&scope=repo,read:org . I don't get the authorize screen to grant access to secondorg ,instead it bypassed it and straight away returns the auth code.
  3. As of now , Only work around i am seeing is Go to -> Oauth App -> Revoke token and then perform Oauth step again , where i can grant access to both organisations . Then i can see two organisations in the response using new access_token

API I am using to get the list of orgs is https://api.github.com/user/orgs

QUESTION

  1. Is there any way to get the list of updated organisation using same access token ?
  2. Is there any way to forcefully get the OAuth Authorization Screen instead of github automatically bypassing the auth screen ?
0 Answers
Related