THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
import * as admin from 'firebase-admin'; | |
import Graphcool, { fromEvent } from 'graphcool-lib'; | |
import { Request, Response } from 'express'; | |
const TAG = 'LoginHandler'; | |
const serviceAccount = require('./path/to/firebaseKey.json'); | |
const pat = '__PAT__' |
const functions = require('firebase-functions') | |
const admin = require('firebase-admin') | |
// This is hosted using Firebase Functions to gain easier access without meddling with service key | |
admin.initializeApp(functions.config().firebase) | |
exports.verifyToken = functions.https.onRequest((req, res) => { | |
const { idToken } = req.query | |
if (!idToken) { |
<template> | |
<div> | |
<h3 class="subheading" v-if="!hideLabel">{{label}}</h3> | |
<v-list v-if="mediaList"> | |
<v-list-tile v-for="(item,i) in mediaList" :key="i"> | |
<v-list-tile-avatar @click="onItemClick(item.url)"> | |
<img :src="item.url" :alt="item.name" :title="item.name"/> | |
</v-list-tile-avatar> | |
<v-list-tile-content @click="onItemClick(item.url)"> | |
<v-list-tile-title>{{item.contentType}}</v-list-tile-title> |
<template> | |
<div> | |
<input type="file" multiple accept="image/jpeg" @change="detectFiles($event.target.files)"> | |
<div class="progress-bar" :style="{ width: progressUpload + '%'}">{{ progressUpload }}%</div> | |
</div> | |
</template> | |
<script> |
const functions = require('firebase-functions'); | |
const util = require('util'); | |
exports.helloWorld = functions.https.onRequest((req, res) => { | |
// For Firebase Hosting URIs, use req.headers['fastly-client-ip'] | |
// For callable functions, use rawRequest | |
// Some users have better success with req.headers['x-appengine-user-ip'] | |
const ipAddress = req.headers['x-forwarded-for'] || req.connection.remoteAddress; | |
const headers = JSON.stringify(req.headers, null, 2); | |
const message = util.format("<pre>Hello world!\n\nYour IP address: %s\n\nRequest headers: %s</pre>", ipAddress, headers); |