Skip to content

ringcentral-tutorials/oauth-js-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RingCentral 3-Legged OAuth Demo in JavaScript

Overview

This is a quick 3-legged OAuth Authorization Code flow demo that runs using client-side JavaScript with the RingCentral JavaScript SDK v3.x.

Video: https://youtu.be/peC_whCMTqU

Installation

Note, please make sure bower is installed.

$ git clone https://github.com/ringcentral-tutorials/oauth-js-demo
$ cd oauth-js-demo
$ bower install ringcentral#~3.x --save

Configuration

Edit the ./public/config.js file to configure your client ID, client secret and redirect URL, etc.

$ cd ./public
$ cp config-sample.js config.js
$ vi config.js

In the Developer Portal, ensure the redirect URI in your config file has been entered in your app configuration. By default, the URL is set to the following for this demo:

http://localhost:8080/oauth2callback.html

Usage

Serve the static page with a static web server such as http-server. You can install it using the following:

$ npm install -g http-server

Start http-server from the public folder using:

$ http-server .

You can also serve the static pages with nginx or apache as you like.

Go to the URL:

http://localhost:8080

Then click the button to authorize the demo app and view the access token.

About

RingCentral client-side JS OAuth Authorization Code demo. See demo walkthrough here: https://ringcentral-tutorials.github.io/oauth-js-demo/

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •