GithubHelp home page GithubHelp logo

isabella232 / connect_with_ifttt_auth_sample Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ifttt/connect_with_ifttt_auth_sample

0.0 0.0 0.0 128 KB

A fake OAuth2 server, mobile API and IFTTT Channel to demonstrate how to implement the server side portion of the Connect with IFTTT SDK.

JavaScript 100.00%

connect_with_ifttt_auth_sample's Introduction

Connect with IFTTT Auth Server Sample

A fake OAuth2 server, mobile API and IFTTT Channel to demonstrate how to implement the server side portion of the Connect with IFTTT SDK.

To Run

> node app

Endpoints

app.get("/login", function(req, res) - This should be considered something that most apps would already have implemented in a private API to authenticate users of an existing mobile application. This function essentially simulates generating some sort of token that is used for private API access. It might be OAuth based, but it might not be.

app.get("/generate_oauth_code", function(req, res) - This is a new function that will need to be implemented on your private API. This will be used to generate a valid OAuth2 Authorization code (as per https://tools.ietf.org/html/rfc6749#section-4.1) that you will hand off to the Connect with IFTTT SDK and will be used later by the IFTTT server to exchange for an OAuth bearer token. Since this is a private authenticated API call, it will most likely use the token generated for private API access for your app. In most cases this should be the only new thing you need to implement on your server to support the Connect with IFTTT SDK.

app.get("/ifttt/v1/user/info", function(req, res) - This is an API endpoint that you'll need to implement for your IFTTT Channel. If you have an IFTTT Channel, you've built this already.

All of the remaining functions are simulations of standard OAuth endpoints that would already be implemented by your OAuth server.

connect_with_ifttt_auth_sample's People

Contributors

jheising 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.