Skip to content

Instantly share code, notes, and snippets.

View andymarch's full-sized avatar

Andy March andymarch

View GitHub Profile
{
"meta": {
"theme": "elegant"
},
"basics": {
"name": "Andy March",
"label": "",
"image": "http://gravatar.com/avatar/d7c78f8757327b65a637aece98939f01",
"summary": "Skilled digital identity specialist, with fifteen years experience in software development and technical customer facing roles. Demonstrated success in defining, developing and delivering complex software projects within security orientated environments.",
"website": "https://andymarch.co.uk",
@andymarch
andymarch / app.go
Created April 3, 2020 12:31
Create Okta App in Go
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
@andymarch
andymarch / index.js
Last active March 26, 2020 11:06
Okta Hapi Bell implementation with Okta.
// Load modules
require('dotenv').config()
const bell = require('@hapi/bell')
const hapi = require('@hapi/hapi')
const authCookie = require('@hapi/cookie')
const config = {
cookiePwd: 'cookiecookiecookiecookiecookiecookiecookiecookiecookie',
okta: {
domain: process.env.DOMAIN,
var email = ""
config['registration'] = {
preSubmit: function (postData, onSuccess, onFailure) {
email = postData.email
onSuccess(postData);
},
postSubmit: async function (response, onSuccess, onFailure) {
// WARNING DEMO ONLY, NOT PRODUCTION
//these two calls should be moved to a backend-for-frontend where they can be called properly
// DO NOT PUT TOKENS IN YOUR FRONTEND CODE
@andymarch
andymarch / keybase.md
Created July 21, 2015 19:46
Account verification on Keybase

Keybase proof

I hereby claim:

  • I am andymarch on github.
  • I am andymarch (https://keybase.io/andymarch) on keybase.
  • I have a public key whose fingerprint is 30C1 52DB 68DD AF98 F2CF C774 D17A EBD2 5637 266D

To claim this, I am signing this object:

@andymarch
andymarch / GooglePhotoTakeout
Created January 3, 2015 12:46
Copy the contents of a Google Takeout for photos to create a local copy
Function CopyGooglePhotoTakeout
{
Param(
[Parameter(Mandatory=$true)]
[string]$sourcePath,
[Parameter(Mandatory=$true)]
[string]$destinationPath,
[Parameter(Mandatory=$true)]
[bool]$skipEdits
)