Symon
Symon

Reputation: 671

Django and NodeJs - Manage authentication

I'm using for my main app Django, and for a third party modules NodeJs with Express. Now, i have to manage in a secure way the authentication of the third party app to my main app written in Django, that implements Tokens for API and default Django Authentication methods.

I have a bunch of ideas in order to achieve that, like:

I think that the first approach is the way to go, but if anyone has some smarter ideas i'll be glad to listen them!

Final remarks/notes: These two apps are exposed to the users using a reverse proxy, and the authentication check can be managed directly backend-to-backend, and, if it's all ok, the application will be served to the user, without exposing any token authentication to the frontend

Upvotes: 2

Views: 724

Answers (1)

Symon
Symon

Reputation: 671

Ok guys, i think that my answer needs to be shared: i've created a "validate" endpoint in my main Django app, and, using a custom middleware in NodeJS, on the third party app i'll check (directly in a backend-backend fashion way) the token validation and then serve the content.

Upvotes: 2

Related Questions