import Head from 'next/head' import Image from 'next/image' import { useRouter } from 'next/router' import { useTranslation, Trans } from 'next-i18next' import { serverSideTranslations } from 'next-i18next/serverSideTranslations' import siteConfig from '../../config/site.config' import apiConfig from '../../config/api.config' import Navbar from '../../components/Navbar' import Footer from '../../components/Footer' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' export default function OAuthStep1() { const router = useRouter() const { t } = useTranslation() return (
{t('OAuth Step 1 - {{title}}', { title: siteConfig.title })}
fabulous fireworks

{t('Welcome to your new onedrive-vercel-index 🎉')}

{t('Step 1/3: Preparations')}

If you have not specified a REDIS_URL inside your Vercel env variable, go initialise one at{' '} Upstash . Docs:{' '} Vercel Integration - Upstash .

Authorisation is required as no valid{' '} access_token or{' '} refresh_token{' '} is present on this deployed instance. Check the following configurations before proceeding with authorising onedrive-vercel-index with your own Microsoft account.

CLIENT_ID {apiConfig.clientId}
CLIENT_SECRET* {apiConfig.obfuscatedClientSecret}
REDIRECT_URI {apiConfig.redirectUri}
Auth API URL {apiConfig.authApi}
Drive API URL {apiConfig.driveApi}
API Scope {apiConfig.scope}

If you see anything missing or incorrect, you need to reconfigure{' '} /config/api.config.js and redeploy this instance.

) } export async function getServerSideProps({ locale }) { return { props: { ...(await serverSideTranslations(locale, ['common'])), }, } }