st4lk / django-rest-social-auth

OAuth signin with django rest framework
MIT License
519 stars 122 forks source link

Improve error handling #154

Closed KOliver94 closed 1 year ago

KOliver94 commented 2 years ago

This PR fixes two potential problem:

KOliver94 commented 1 year ago

Hi @st4lk,

Can you consider merging this change?

Thanks!

st4lk commented 1 year ago

Hey @KOliver94 ! I think it will be safer to not expose all errors to clients by default. Agree it may be useful, but there is a potential risk that some information included in error can be dangerous: the error is returned to the server that has higher permissions than the browser client. So by default such errors are not returned by API (will be logged on the server only). But there is a possibility to turn them on with REST_SOCIAL_VERBOSE_ERRORS = True settings. It is up to developer.

I've done it here: https://github.com/st4lk/django-rest-social-auth/pull/168

Available in pypi rest-social-auth v8.0.0

KOliver94 commented 1 year ago

Great! Thank you!