Here is my scenario
i have created an Github Oauth App and below are the steps performed
I completed oauth flow via URL
https://github.com/login/oauth/authorize client_id=XXXXXXXXXX&scope=repo,read:orgAnd then i grant the access to existing organisation named firstOrg and i got access_token.When i use github api using access token from step 1 to get list of organisations . I see firstOrg in the response
Now after some time, i added new organisation under same github account called secondorg .
Issues:
- 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
- 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. - 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
- Is there any way to get the list of updated organisation using same access token ?
- Is there any way to forcefully get the OAuth Authorization Screen instead of github automatically bypassing the auth screen ?