Answer the question
In order to leave comments, you need to log in
Social Login and Angular - client or server?
Hello. I'm missing arguments to choose which side (frontend or backend) to implement social login (Google, Facebook...) for an app that consists of two containers: Angular+Nginx (frontend) and NodeJs+Express (backend).
Each of the options is eligible for implementation. I will briefly write what I considered doing for each of the parties.
A bit of context.
After successful authentication on the backend (for example, login via email + password is now implemented), the client receives a JWT token, which Angular saves in localStalorage and, using the Interceptor, adds, as a header, to each request to protected methods on the backend.
The planned implementation of social login in general terms assumes the following logic (using facebook as an example):
app.get('/auth/facebook', ...);
app.get('/auth/facebook/callback', ...);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question