xflorin94
xflorin94

Reputation: 133

Authorization between services Django and NodeJs

I'm building an app using React on the frontend and Django and Nodejs on the backend. On the Django side I store the users and user authorization.

Right now I'm using django-rest-knox to generate the user token, but the problem is that if I make a request to Nodejs service I cannot decrypt the token there. I must to make another request to Django service to verify the token.

A solution would be to use JWT Token. But the JWT Token is not stored to database ( I cannot change the expiration type per individual token)

I somebody here that faced the same problem like me or can give me an advice ?

Upvotes: 2

Views: 512

Answers (1)

itjuba
itjuba

Reputation: 528

As far as i know you have two options : The first consists of Django API acting like an authentification gateway, meaning that you have to pass by Django. (JWT)

The second solution is to use the digital signature (public/private key asymmetric mechanism) (JWT)public key and private key in digital signatures

Upvotes: 1

Related Questions