Skip to content

Instantly share code, notes, and snippets.

@will-t-harris
will-t-harris / auth0-rule-shopify-multipass.js
Created January 29, 2024 19:54 — forked from drovani/auth0-rule-shopify-multipass.js
Auth0 Rule to Generate a Multipass token and redirect the user back to the Shopify store
function (user, context, callback) {
if (context.clientMetadata && context.clientMetadata.shopify_domain && context.clientMetadata.shopify_multipass_secret)
{
const RULE_NAME = 'shopify-multipasstoken';
const CLIENTNAME = context.clientName;
console.log(`${RULE_NAME} started by ${CLIENTNAME}`);
const now = (new Date()).toISOString();
let shopifyToken = {
email: user.email,
@will-t-harris
will-t-harris / api.ts
Created May 17, 2023 23:49 — forked from JaysonChiang/api.ts
Example of Axios with TypeScript
import axios, { AxiosError, AxiosResponse } from 'axios';
import token from './somewhere';
interface Todo {
id: string;
title: string;
}
interface User {
id: string;
@will-t-harris
will-t-harris / ecdh.py
Created March 6, 2020 18:55 — forked from mrinalwadhwa/ecdh.py
Elliptic Curve Diffie-Hellman key exchange from scratch
#!/usr/bin/env python3
# The below code is an attemt to understand Elliptic Curve Cryptography
# by implementing Elliptic Curve Diffie-Hellman key exchange from scratch.
# DON'T USE THIS CODE IN YOUR APP!!
# It is not safe and is intended only as a learning tool.
import secrets