Code Monkey home page Code Monkey logo

Comments (3)

billpull avatar billpull commented on July 17, 2024

Are you using the stateless version of the authentication? https://django-rest-framework-simplejwt.readthedocs.io/en/latest/stateless_user_authentication.html

from djangorestframework-simplejwt.

anusreesoumya avatar anusreesoumya commented on July 17, 2024

@billpull ,No, I'm not utilizing the stateless version of authentication. Specifically, I've configured the REST_FRAMEWORK settings with the following:, REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework_simplejwt.authentication.JWTAuthentication', )
}.
Can I use JWTStatelessUserAuthentication instead of JWTAuthentication in my project, even though I don't have multiple applications? I saw in the Simple-JWT documentation that 'JWTStatelessUserAuthentication' helps with single sign-on between separate Django apps that share the same token secret key. Is there are any specific considerations, or limitations associated with using JWTStatelessUserAuthentication in my project?

from djangorestframework-simplejwt.

Andrew-Chen-Wang avatar Andrew-Chen-Wang commented on July 17, 2024

Yes, the stateless version will not perform the backend call. The backend call is simply to retrieve the User object. Django's default authentication method also does this with its session-state-backend cookie approach. Instead, the stateless approach will not make that call and utilize a custom User class that we define to return user attribute values. Please see the setting for how to override it.

from djangorestframework-simplejwt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.