Skip to content

Instantly share code, notes, and snippets.

View KendallWeihe's full-sized avatar
🤠

Kendall Weihe KendallWeihe

🤠
View GitHub Profile
@KendallWeihe
KendallWeihe / auth0-spa-js.tsx
Created December 21, 2019 19:32
TypeScript, React, Hooks & auth0-spa-js
import * as React from "react";
import { useState, useEffect, useContext, FC } from "react";
import createAuth0Client from "@auth0/auth0-spa-js";
interface Auth0ProviderProps {
auth0Options: Auth0ClientOptions;
onRedirectCallback: Function;
}
export const Auth0Context = React.createContext(undefined);