A
A
alehandroWEB2019-10-24 11:00:11
Node.js
alehandroWEB, 2019-10-24 11:00:11

How to do authorization for socket.io?

Initial data:
- there is crm written in Yii2.
Task:
- write a chat that will work in crm in a pop-up window
- this chat should also work separately from crm as an android application - the user database should be
used from crm -
the chat will work on a separate server and on a different domain that we will use Angular as a client. Embed it in crm using Angular Elements. Probably make an Android application from Angular using cordova (I don’t know yet))). Now the main question arises how to make authorization?
I see it this way: when authorizing in crm, pass the entered login and password to Angular, so that he, in turn, logs in parallel in the chat where passport.js will work and then uses the chat cookies for the socket connection. Well, the android application has its own authorization form.
Is this the right way of thinking, or am I overthinking something?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question