Hi Krishnakant,

If you wanna use Django Ninja's Auth, then use it properly: Authentication
- Django Ninja (django-ninja.dev)
<https://django-ninja.dev/guides/authentication/>

And if you insist on logging in with JWT, please use django-ninja-jwt.
django-ninja-jwt
ยท PyPI <https://pypi.org/project/django-ninja-jwt/>

On Fri, 11 Oct 2024 at 23:28, Krishnakant Mane <[email protected]> wrote:

> Hello.
>
> This seems very complex to me.
>
> I have previously used other Python and non-Python frameworks and one
> thing I always did is to create my own user table and respective model.
>
> I wish to do the same thing in django with ninja.
>
> I also find the jwt authentication articles/ blogs online very complex.
>
> Can some one guide me to a simple explanation?
>
> My requirement is very simple.
>
> I have an accounts table with all user data including username and
> password.
>
> The user creates this during registration, I don't want to use the django
> user model.
>
> Now every time the user logs in, I wish to generate the token and with
> every request I need to authentication.
>
> I know that in the router.get or router.post decorator I will have to
> inject the authentication function.
>
> But no tutorial gives a clear indication of where to create this class and
> no simple code to just authenticate and go ahead.
>
> I am trying to use simplejwt from rest_framework.
>
> If this is not the correct way please guide.
>
> Regards.
> --
> *Krishnakant Mane*
> Software Architecture Design & Implementation Specialist
>
> Mobile:
> +91 8424039903
> https://www.linkedin.com/in/krishnakant-r-mane/
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/9326d678-fefd-4176-8a61-d24c86c6bc1c%40gmail.com
> <https://groups.google.com/d/msgid/django-users/9326d678-fefd-4176-8a61-d24c86c6bc1c%40gmail.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Abdul Qoyyuum Bin Haji Abdul Kadir
Nickname: Q
More about me: https://buymeacoffee.com/qoyyuum

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANVqoJ8KGfcdkzmx_q4V%3D-DiWtNsq-aHmw19C84BocuOA60qoA%40mail.gmail.com.

Reply via email to