jetbridge / flask_cognito

Flask authentication with JWT against AWS Cognito
MIT License
94 stars 30 forks source link

Failed Authentication is overly verbose #13

Closed antdking closed 3 years ago

antdking commented 3 years ago

Failed authentication attempts get logged at the Error level, with no way to configure it outside of disabling logging for the entire package.

Please provide a way to configure the Log Level for Auth issues, or set to Info level by default.

The rationale for this would be that an API Provider would not need to action a user entering their credentials incorrectly.


Lines affected:

To retain the exception details in the error, you can include it via exc_info:

log.info("Authentication Failed", exc_info=e)
log.info("Authentication Failed", exc_info=True)
revmischa commented 3 years ago

Sounds like a good idea! PRs very welcome