https://github.com/circuit/webserver-example
Web server app using Circuit OAuth 2.0 Authorization Code Grant
https://github.com/circuit/webserver-example
circuit oauth2 rest-api
Last synced: 9 months ago
JSON representation
Web server app using Circuit OAuth 2.0 Authorization Code Grant
- Host: GitHub
- URL: https://github.com/circuit/webserver-example
- Owner: circuit
- Created: 2016-09-30T23:20:55.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-06-26T16:31:22.000Z (almost 8 years ago)
- Last Synced: 2025-02-09T20:33:22.226Z (about 1 year ago)
- Topics: circuit, oauth2, rest-api
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 2
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# webserver-example
Example node.js web application to access the [circuit REST API](https://circuitsandbox.net/rest/v2/swagger).
The example shows how to authenticate using OAuth2 without any library and then perform REST calls.
## Getting Started
### Register an application
Until the developer portal is ready to self-register an application, register using the form at https://circuit.github.io/oauth.html.
### Run the example
* Rename config.json.template to config.json and add your `client_id` and `client_secret`.
* Change the host and listening port if the app is not hosted at http://localhost:7007
```bash
git clone https://github.com/circuit/webserver-example.git
cd webserver-example
// Rename config.json.template to config.json and add your `client_id` and `client_secret`
// Change the host and listening port if the app is not hosted at http://localhost:7007
npm install
node index.js
```