question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Debugging 500 internal error from auth/oauth2/token ?

See original GitHub issue

I am constantly getting 500 error for password type tokens request against auth/oauth2/token, and trying to figure out what went wrong (no change in auth module at all, and start getting such error), so naturally I start trying adding logging, but could not figure out how, does anyone here know how?

looking at this function from app/modules/auth/views.py

@auth_blueprint.route('/oauth2/token', methods=['GET', 'POST'])
 @oauth2.token_handler
 def access_token(*args, **kwargs):
     # pylint: disable=unused-argument
     """
     This endpoint is for exchanging/refreshing an access token.

     Returns:
         response (dict): a dictionary or None as the extra credentials for
         creating the token response.
     """
     # log.info(**kwargs) # added this, but not seeing anything
     return None

the only logging does not seem to print anything in console.

Can anyone kindly offer anything I can try to debug further ?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
frolcommented, Feb 5, 2019

@10000TB log.info expects the first parameter to be a formatting string, so use log.info("ACCESS TOKEN: args=%r, kwargs=%r", args, kwargs).

0reactions
10000TBcommented, Feb 6, 2019

Enlightened , 👍

set(scopes) - {‘’}

Read more comments on GitHub >

github_iconTop Results From Across the Web

OAuth/token giving 500 internal server error
Any reason why this issue is only coming in case of authorization grant type. The server log will tell you exactly why this...
Read more >
OAuth Token POST request getting 500 Internal Server Error
When I try to login with the UCWA JS Helper libraries, OAuth token request is getting internal server error. That is supposed to...
Read more >
GoogleOauth2 Issue Getting Internal Server 500 error
Here is my provider config from startup.auth.cs.. When turned on, all of the providers including the google provider get a 500 internal server...
Read more >
Authentication fails with Internal Server Error (500) after ...
The purpose of this article is to provide assistance if you cannot log in to the resource being protected by the agent after...
Read more >
OAuth: Internal 500 server error after get userinfo
I think, the problem might be the length of the access token because the fourth level of AD users can access and the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found