This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Juan de los Palotes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*NAV BAR*/ | |
.nav-container ul.menu li.button a { | |
background-color: #222222; | |
color: #ffffff; | |
border: none !important; | |
} | |
.nav-container ul.menu li.button a:hover { | |
background-color: #000000; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require("express"); | |
const bodyParser = require("body-parser"); | |
const request = require("superagent"); | |
const app = express(); | |
app.use(bodyParser.json()); | |
app.get("/callback", (req, res, next) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const passport = require('passport') | |
const GitHubStrategy = require('passport-github') | |
passport.use( | |
new GitHubStrategy( | |
{ | |
clientID: process.env.GITHUB_CLIENT_ID, | |
clientSecret: process.env.GITHUB_CLIENT_SECRET, | |
callbackURL: process.env.GITHUB_REDIRECT_URL || '/auth/github/redirect', | |
scope: ['user:email'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bootstrap() { | |
const script = document.createElement('script') | |
script.src = 'https://public-assets.typeform.com/public/oauthbtn/btn.min.js' | |
script.type = 'text/javascript' | |
script.async = true | |
// script.onload = () => this.setState({loading: false}); | |
const scriptConfig = {} | |
scriptConfig['name'] = 'tf-login-button' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.get( | |
'/auth/typeform/redirect', | |
passport.authenticate('typeform'), | |
(req, res) => { | |
res.redirect('/themes') | |
} | |
} | |
app.get('/themes', (req, res) => { | |
res.render('themes', { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.get( | |
'/auth/typeform/redirect', | |
passport.authenticate('typeform'), | |
(req, res) => { | |
res.send(req.user) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express') | |
const path = require('path') | |
const passport = require('passport') | |
const TypeformStrategy = require('passport-typeform') | |
const app = express() | |
app.set('view engine', 'ejs') | |
app.set('views', path.join(__dirname, '/views')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
passport.use( | |
new TypeformStrategy( | |
{ | |
// options for the typeform strategy | |
clientID: process.env.CLIENT_ID, | |
clientSecret: process.env.CLIENT_SECRET, | |
callbackURL: process.env.REDIRECT_URI, | |
scope: ['accounts:read', 'forms:write'] | |
}, | |
(accessToken, refreshToken, profile, cb) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Themeform</title> | |
<style> | |
body { | |
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |
margin: 0; |
NewerOlder