This file contains 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
export async function fetchAccessTokens (code) { | |
const response = await axios.post(GOOGLE_TOKEN_URL, qs.stringify({ | |
code, | |
client_id: GOOGLE_CLIENT_ID, | |
redirect_uri: GOOGLE_REDIRECT_URI, | |
grant_type: 'authorization_code', | |
}), { | |
headers: { | |
'Content-Type': 'application/x-www-form-urlencoded', | |
}, |
This file contains 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
function handleNavigation (url) { | |
const query = parse(url, true).query | |
if (query) { | |
if (query.error) { | |
reject(new Error(`There was an error: ${query.error}`)) | |
} else if (query.code) { | |
// Login is complete | |
authWindow.removeAllListeners('closed') | |
setImmediate(() => authWindow.close()) |
This file contains 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
export function signInWithPopup () { | |
return new Promise((resolve, reject) => { | |
const authWindow = new remote.BrowserWindow({ | |
width: 500, | |
height: 600, | |
show: true, | |
}) | |
// TODO: Generate and validate PKCE code_challenge value | |
const urlParams = { |
This file contains 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
import {parse} from 'url' | |
import {remote} from 'electron' | |
import axios from 'axios' | |
import qs from 'qs' | |
const GOOGLE_AUTHORIZATION_URL = 'https://accounts.google.com/o/oauth2/v2/auth' | |
const GOOGLE_TOKEN_URL = 'https://www.googleapis.com/oauth2/v4/token' | |
const GOOGLE_PROFILE_URL = 'https://www.googleapis.com/userinfo/v2/me' | |
export async function googleSignIn () { |
This file contains 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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: {{ template "fullname" . }} | |
labels: | |
app: {{ template "fullname" . }} | |
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | |
release: "{{ .Release.Name }}" | |
heritage: "{{ .Release.Service }}" | |
spec: |
This file contains 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
apiVersion: v1 | |
kind: ReplicationController | |
metadata: | |
name: {{ template "fullname" . }} | |
labels: | |
app: {{ template "fullname" . }} | |
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | |
release: "{{ .Release.Name }}" | |
heritage: "{{ .Release.Service }}" | |
spec: |
This file contains 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
imageName: "node" | |
imageTag: "boron" | |
cpu: 100m | |
memory: 256Mi | |
port: 3000 | |
replicas: 1 |
This file contains 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
name: node | |
version: 1.0.0 | |
description: Chart for derivatives of the official Node images | |
keywords: | |
- node | |
- application | |
home: https://nodejs.org/en/ | |
sources: | |
- https://github.com/kubernetes/charts | |
- https://github.com/docker-library/node |
This file contains 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
{{/* vim: set filetype=mustache: */}} | |
{{/* | |
Expand the name of the chart. | |
*/}} | |
{{- define "name" -}} | |
{{- default .Chart.Name .Values.nameOverride | trunc 24 -}} | |
{{- end -}} | |
{{/* | |
Create a default fully qualified app name. |
This file contains 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
module SelectFrom.Client (init) where | |
import Prelude | |
import Control.Monad.Eff (Eff) | |
import DOM (DOM) | |
import DOM.HTML (window) | |
import DOM.HTML.Document (body) | |
import DOM.HTML.Types (htmlElementToNode, htmlDocumentToDocument) | |
import DOM.HTML.Window (document) | |
import DOM.Node.Document (createElement) as Document |