Answer the question
In order to leave comments, you need to log in
How to organize authorization in a bunch of node.js and vue.js?
How to competently organize authorization in a bunch of node.js and vue.js? You need authorization through vk, google, facebook, as well as classic. Heard about passport.js. Are there any difficulties with it? What other options exist?
Answer the question
In order to leave comments, you need to log in
Take Passport.js and Express.js. They work well together. There are no special difficulties, if, of course, you understand how authorization works in general. About alternatives, to be honest, I do not remember. When I searched, something popped up, but a passport is better both in terms of simplicity and in terms of a wide range of available authorization methods.
From the Vue.js side, there are no difficulties. Vue.js does not provide any tooling for dealing with http requests. Therefore, all possible difficulties in this regard will be associated with the library that you choose for this. I would recommend targeting the new fetch API right away. If you need support for older browsers, there are polyfills. Fetch transparently supports both cookies and authorization headers, so there shouldn't be much of a problem.
For testing and debugging authorization on the backend, a very useful tool is Postman. Allows you to make requests to the backend without a browser and client side, easy to play with request parameters, cookies and headers.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question