why deepstreamHub? compare us getting started feature roadmap faq
use cases pricing
developers
company
enterprise blog contact

Getting started with deepstreamHub is easy and takes less than ten minutes. However, if you have any questions, please get in touch.

This guide will take you through connecting a client via open authentication (authentication with no credentials) in deepstreamHub.

To do this, we'll be using the JavaScript client SDK.

Create a free account and get your API key

By default, open authentication is enabled in a deepstreamHub application, you can access and edit which types of authentication your users can login with via the Auth page.

It should look a bit like this on the Auth page when you login:

open-auth

Connect to deepstreamHub and log in

From here, you just need to include the JS-client library:

<script src="https://cdnjs.cloudflare.com/ajax/libs/deepstream.io-client-js/2.1.1/deepstream.js"></script>

or if you're using NodeJs:

const deepstream = require('deepstream.io-client-js')

Get your app url from the dashboard and establish a connection to deepstreamHub:

const client = deepstream('<YOUR APP URL>')

To log in, because we're using open auth we can either call the login() method without parameters, or if we want a callback to ensure that we logged in, we can pass an empty object and callback as follows:

client.login()

client.login({}, (success) => {
    // success will be true
})

Where to go next?

To learn how to use deepstreamHub with Angular, React, Vue or other frontend frameworks, head over to the tutorial section. To learn how to use the JavaScript SDK with NodeJS rather than in a browser, head over to the getting started with NodeJS tutorial.