Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Hasnainali9's avatar

Passport Authentication

Hey i want to authenticate a user in express js using socket is there a way to call passport authentication without route.

0 likes
2 replies
vincent15000's avatar

I don't think that there is any other way than calling the authentication with a route.

Effectively you are handling APIs and your frontend will execute actions only via the APIs routes. That's the only way to communicate between the backend and the frontend.

martinbean's avatar

Hey i want to authenticate a user in express js using socket is there a way to call passport authentication without route.

@hasnainali9 No, because Passport authenticates HTTP requests, not web sockets.

1 like

Please or to participate in this conversation.