ahopkins / sanic-jwt

Authentication, JWT, and permission scoping for Sanic
http://sanic-jwt.readthedocs.io
MIT License
242 stars 52 forks source link

When user secret enabled, user id configuration is not working #223

Open yusufertekin opened 2 years ago

yusufertekin commented 2 years ago

sanic_jwt/authentication.py Line 262: Use configured user_id instead of hardcoded 'user_id'

user_id = payload.get('user_id') => user_id = payload.get(self.config.user_id())

Even with a fix for this on the source code, authentication fails when user secret enabled.

In my case, User object has a ID field named different than user_id.

I wanted to create a PR to contribute, however, contribution documentation returns 404.