feat: enhance AuthUI with redirectPathname prop for improved navigation

This commit is contained in:
Rotimi Best
2025-09-10 18:49:50 +01:00
parent 34a4e867bc
commit f63b3021f6
2 changed files with 14 additions and 9 deletions
@@ -16,6 +16,9 @@
export let showLogo = false;
export let formRef;
export let hideGoogleAuth = false;
export let redirectPathname = '';
$: console.log('redirectPathname', redirectPathname);
async function signInWithGoogle() {
if (isLoading) {
@@ -27,7 +30,8 @@
// const redirectTo = `https://app.classroomio.com?forwardTo=${
// window.location.origin + params.get('redirect')
// }`;
const redirectTo = `${window.location.origin + params.get('redirect')}`;
const pathname = redirectPathname || params.get('redirect');
const redirectTo = `${window.location.origin + pathname}`;
console.log({ redirectTo });