Skip to content

Commit

Permalink
fix: invalid authorisation code
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethan-Chew committed Dec 19, 2023
1 parent 182591c commit 542d2a3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions src/pages/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import PMApi from "@/components/PMApi/PMApi";
import UserCreation from "@/components/UserCreation/UserCreation";
import { withPageAuthRequired } from "@auth0/nextjs-auth0";
import Link from "next/link";
export const metadata = {
title: "",
description: ""
}

export default function Home({ posts, memusers }) {

Expand Down
2 changes: 1 addition & 1 deletion src/pages/Landing.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const LandingHeaderBar = () => {
</Link>
<div className="ml-auto space-x-3">
<Link
href={`https://projmatch.us.auth0.com/authorize?response_type=code&client_id=${process.env.AUTH0_CLIENT_ID}&redirect_uri=${process.env.AUTH0_BASE_URL}/Load&audience=${process.env.AUTH0_AUDIENCE}&scope=openid%20profile%20email`}
href={`https://projmatch.us.auth0.com/authorize?response_type=code&client_id=${process.env.AUTH0_CLIENT_ID}&redirect_uri=${process.env.AUTH0_BASE_URL}/Load&audience=${process.env.AUTH0_AUDIENCE}`}
className=""
>
<button className="rounded-full bg-blue px-4 pb-2 pt-1 text-center font-bold text-white duration-500 hover:scale-105">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Load.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function Load() {
accessToken: accessToken
}
})

const token = response.data.token
if (response.status === 200) {
await axios.get(`/api/setCookie?name=authorisation_token&value=${token}`)
Expand Down

0 comments on commit 542d2a3

Please sign in to comment.