GithubHelp home page GithubHelp logo

ustream-nodejs-oauth-example's Introduction

Ustream Oauth Demo

This app demonstrates how to authenticate clients with Ustream's oauth API and the ustream nodejs sdk. Two oauth flows are featured in this demo:

Implicit flow Suitable for standalone, native clients (desktop / mobile). The user enters its credentials to a secure login webpage. After logging in, the browser is redirected to a special URL (defined by the client), passing the access token in the URL. -- Ustream Documentation

Authorization code flow Suitable for third-party websites which contain a client and a server component. The user enters its credentials to a secure login webpage. After logging in, the browser is redirected to a special URL (defined by the client), passing an authorization code in the URL. The third-party server obtains the access token with another HTTP request in the background, using the authorization code. This method is more secure than the implicit flow if the third-party client has a client+server model. See the OAuth2 Draft for details. -- Ustream Documentation

An example of the third type of flow, client credentials flow can be found in the ustream nodejs sdk readme. You can find more information about authentication flows in the official ustream docs.

Live Demo

View Demo

Installation

Install dependencies.

yarn install

Set environment variables.

USTREAM_CLIENT_ID - Your ustream client ID.
USTREAM_CLIENT_SECRET - Your ustream client secret.
USTREAM_REDIRECT_URI - https://yourdomain.com/channels

The value of USTREAM_REDIRECT_URI must exactly match the redirect uri you set when creating your Ustream API credentials.

This demo expects the user to be redirected to the /channels endpoint after logging in to their Ustream account.

Run the app

The app will run on port 3000. It must be hosted on a webserver that ustream can access (localhost will not work).

npm start

Using the app

Oauth Demo

ustream-nodejs-oauth-example's People

Contributors

michaeljamesparsons avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.