store tokens in redis with upstash

This commit is contained in:
spencerwooo
2021-12-31 20:03:17 +08:00
parent 49c2e57333
commit 115b550cb5
7 changed files with 247 additions and 122 deletions
+4 -2
View File
@@ -1,6 +1,6 @@
import Head from 'next/head'
import router from 'next/router'
import { useState } from 'react'
import { useRouter } from 'next/router'
import { useEffect, useState } from 'react'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import siteConfig from '../../config/site.json'
@@ -10,6 +10,8 @@ import { LoadingIcon } from '../../components/Loading'
import { extractAuthCodeFromRedirected, generateAuthorisationUrl } from '../../utils/oAuthHandler'
export default function OAuthStep2() {
const router = useRouter()
const [oAuthRedirectedUrl, setOAuthRedirectedUrl] = useState('')
const [authCode, setAuthCode] = useState('')
const [buttonLoading, setButtonLoading] = useState(false)