check resource id on verify access token

This commit is contained in:
miloschwartz
2025-04-06 13:08:55 -04:00
parent 5a6a035d30
commit 0e65f8c921
4 changed files with 16 additions and 8 deletions

View File

@@ -17,13 +17,11 @@ import { useEffect, useState } from "react";
type AccessTokenProps = {
token: string;
resourceId?: number;
redirectUrl?: string;
};
export default function AccessToken({
token,
resourceId,
redirectUrl
resourceId
}: AccessTokenProps) {
const [loading, setLoading] = useState(true);
const [isValid, setIsValid] = useState(false);
@@ -96,7 +94,7 @@ export default function AccessToken({
if (res.data.data.session) {
setIsValid(true);
window.location.href = appendRequestToken(
redirectUrl!,
res.data.data.redirectUrl!,
res.data.data.session
);
}

View File

@@ -123,7 +123,6 @@ export default async function ResourceAuthPage(props: {
<AccessToken
token={searchParams.token}
resourceId={params.resourceId}
redirectUrl={redirectUrl}
/>
</div>
);