Stuck on confirm page after OAuth redirect(Nuxt/Supabase/Ionic)
Hi,
I've started to build a project with Nuxt, Supabase and Ionic. Since i want to build a PWA in the end of this journey i want my users to sign in with OAuth. So I did the necessary steps of creating Supabase project, enabled google provider, generated credentials on google cloud developer console etc.
Since nuxt supabase module requires to create login and confirm pages i mostly copy pasted the code from the nuxt/supabase docs. Now the authentication works ok, after that i'm correctly redirected to confirm page and then I'm stuck there, no error in console or server console. So i've tried to use the debugger to see the result of navigateTo which is
undefined
...when i went deeper i saw that on checking the routeguards I'm getting the Navigation cancelled with new navigation
error. So i thoght....ok maybe i need to use the ionRouter instead of navigateTo. But that was working the same as the navigateTo method ....still stuck on the confirm page.
I'm really out of ideas and no one seems to care in the discussion channel, so I'm trying it here, before i completely lose my patience with nuxt and move to some framework that isn't bugged with incomplete docs and not responsive community :( Sorry to write it like this, but have no other option....28 Replies
login.vue
confirm.vue
is there anyway to get a slim repo/stackblitz of this?
Also have you tried "preserving logs" in the dev tools "console" or "network" tabs?
does "user" ever come back with a value? is the user a reactive property?
Im not sure about the stackblitz, cause for the supabase auth to work, you need the supabase url and key which i dont know if i can put there, lemme check
Anyway, the user value is present with all the info from google like name, avatar_url etc so it's there definitely, if i add simple console.log before the navigateTo i can see this printed immediately after getting to that confirm page
Also i would need to add your email as an allowed user for the google credentials/app
Anyway repo is here https://github.com/DepkaCZ/dogiary-ionic
GitHub
GitHub - DepkaCZ/dogiary-ionic
Contribute to DepkaCZ/dogiary-ionic development by creating an account on GitHub.
ya that's fine, i get it
are you going off of any docs about authenticating with google?
What do you mean ?
Yes already did everything in there, the authentication works ok
The redirect is the problem
oh i was just asking bc i was trying to test your repo locally, but i dont have google auth provider supported on my end...
Yea you need to create the credentials on cloud developer console to test that
jk
:))
i'd suggest just playing around with the "watch(user..." with "watch(user?.value..."
and maybe try without immediate: true?
Will try but as ive said, the user gets populated, cookies are created so i dont know it seems like its a bug…but from what module ? Guess i will try to get rid of ionic to see if the bug is not there…