These instructions are for application developers adding Backplane functionality to a standalone application or a web application (as opposed to a website). Once implemented, your element or web app will be configured to listen to a Backplane Server, and can be deployed in any Backplane-enabled site.
In the Dashboard, these values are listed as
backplane_bus. Copy these values to a text file (or write them down)—you will need them later.
The following code example is used to listen to the Backplane channel—add it to the existing application code.
The example listens for the Backplane
identity/login event, which you can use with User Registration’s
entity.find API call to get the full profile data. Make sure to use your
client_secret for this call.
When you receive a Backplane event, you’ll want to use the
profile will contain the information you need to authenticate the user for your app.
One way to handle a logout is to close the channel when it’s no longer needed. This is typically done on user sign-out.
Close a channel by opening a new one to take its place.
Another way to handle a logout is to send a logout message on the current bus. For example, instead of changing the channel on logout, you could publish an identity/logout message on the channel.