https://github.com/snapchat/express-4.x-passport-snapchat-example
Express 4.x app using Passport for authorization with Snapchat.
https://github.com/snapchat/express-4.x-passport-snapchat-example
Last synced: 10 months ago
JSON representation
Express 4.x app using Passport for authorization with Snapchat.
- Host: GitHub
- URL: https://github.com/snapchat/express-4.x-passport-snapchat-example
- Owner: Snapchat
- License: unlicense
- Created: 2018-11-28T01:02:56.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2023-04-15T09:11:42.000Z (about 3 years ago)
- Last Synced: 2025-04-13T00:26:31.087Z (about 1 year ago)
- Language: JavaScript
- Size: 41 KB
- Stars: 42
- Watchers: 4
- Forks: 16
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This example demonstrates how to use [Express](http://expressjs.com/) 4.x and
[Passport](http://passportjs.org/) to authenticate users using Snapchat. Use
this example as a starting point for your own web applications.
## Instructions
To install this example on your computer, clone the repository and install
dependencies.
```bash
$ git clone https://github.com/Snapchat/express-4.x-passport-snapchat-example.git
$ cd express-4.x-passport-snapchat-example
$ npm install
```
The example uses environment variables to configure the consumer key and
consumer secret needed to access snapchat's API. Start the server with those
variables set to the appropriate credentials.
```bash
$ CLIENT_ID=__snapchat_CLIENT_ID__ CLIENT_SECRET=__snapchat_CLIENT_SECRET__ SESSION_SECRET=whatever node server.js
```
Open a web browser and navigate to [http://localhost:3000/](http://localhost:3000/)
to see the example in action.