March 2020
Intermediate to advanced
328 pages
7h 58m
English
In the last chapter, we explored the basics of real-time applications powered by Channels, which let you build simple real-time applications. However, there’s still more you need to know to build full-featured applications. In this chapter, we’re going to cover adding access restriction to Sockets and Channels.
We’ll start this chapter by examining how to restrict access to Channels and Sockets, to ensure that data is provided only to the right users. We’ll use a Phoenix.Token to pass authentication information from the server to the view, and then will use that to add Channel access restriction to the JavaScript client. You’ll learn when to use a single Socket or multiple Sockets in your applications, ...
Read now
Unlock full access