Horrible redirect kludge to fix login flow, tidy up and readme

This commit is contained in:
Michael Dausmann
2023-01-02 20:53:04 +11:00
parent 0dbc33a145
commit edd65f1301
5 changed files with 21 additions and 19 deletions

View File

@@ -8,8 +8,9 @@
async function signInWithGoogle() {
const { data, error } = await supabase.auth.signInWithOAuth({
provider: 'google',
// options: { redirectTo: 'dashboard'} // the redirectTo option doesn't work
})
navigateTo('dashboard'); // This doesn't work, it navigates prior to the login handshake completing and then the handshake lands on the index page and ignores the middleware.
// navigateTo('dashboard'); // This doesn't work, it navigates prior to the oauth handshake completing and then the handshake lands on the index page and ignores the middleware.
}
</script>