From ec9cd56e27b914d51f679fe2be28bdd574e9dd2c Mon Sep 17 00:00:00 2001 From: Alaister Young Date: Tue, 22 Nov 2022 06:06:58 +0000 Subject: [PATCH] ensure other query params are included when there is an existing ?next= --- studio/hooks/misc/withAuth.tsx | 4 ++-- studio/lib/gotrue.ts | 9 ++------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/studio/hooks/misc/withAuth.tsx b/studio/hooks/misc/withAuth.tsx index 15776ca1f05..05eb8a0ee9b 100644 --- a/studio/hooks/misc/withAuth.tsx +++ b/studio/hooks/misc/withAuth.tsx @@ -2,7 +2,7 @@ import { ComponentType, useEffect } from 'react' import Head from 'next/head' import { NextRouter, useRouter } from 'next/router' -import { STORAGE_KEY } from 'lib/gotrue' +import { getNextPath, STORAGE_KEY } from 'lib/gotrue' import { IS_PLATFORM } from 'lib/constants' import { useProfile, useStore, usePermissions } from 'hooks' import Error500 from '../../pages/500' @@ -86,7 +86,7 @@ export function withAuth( to the login page if they are guaranteed (no token at all) to not be logged in. */}