-
Create a fresh new Next js project. https://nextjs.org/docs/getting-started#automatic-setup
pnpm create next-app --typescript
-
install prettier
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 React, { useState, useEffect, useContext } from 'react' | |
import createAuth0Client from '@auth0/auth0-spa-js' | |
const DEFAULT_REDIRECT_CALLBACK = () => | |
window.history.replaceState({}, document.title, window.location.pathname) | |
export const Auth0Context = React.createContext() | |
export const useAuth0 = () => useContext(Auth0Context) | |
let _initOptions |