problem in getting authorization code

While making the GET call to if the user is already logged in to codechef it opens and shows the message ‘invalid authorization request’. If the user was not logged in before, it works fine. What is the problem here?

@priyanshi_, you can use this sample app for reference:
If you still face some issue, please let us know.