Use Authentication from JavaScript
Learn how to use authentication from JavaScript.
We'll cover the following...
Adding authentication
Clients that connect to our secured Socket must pass the authentication parameters on connection. Phoenix’s JavaScript client provides a simple way to add the proper authentication parameters.
We wrote an AuthSocket
that accepts a “token” parameter and verifies it using a known secret. We’ll complete the client-side of this flow by ...