feat: enhance AuthUI with redirectPathname prop for improved navigation
This commit is contained in:
@@ -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 });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user