Back

[SOLVED] Nuxt 3 | OAuth callback URL

  • 0
  • Web
Drake
5 Aug, 2023, 18:04

Not sure if that's necessary...if account.get() is successful, the user has a valid session. Otherwise, they don't

TL;DR
The user had an issue with the OAuth callback URL in Nuxt 3. The problem was resolved by using a valid domain for local testing and accepting the self-signed certificate. There was also a mention of bypassing the CORS error and updating the hosts file to have a local domain. The final resolution was that the issue was caused by cookies. No specific solution was provided for this.
XaFigg
5 Aug, 2023, 18:06

Oh ok, I'll try, thanks for the info, I'll be back I'll try

XaFigg
5 Aug, 2023, 18:14
XaFigg
5 Aug, 2023, 18:15

I changed getSession("current") to get(), but the effect remains the same :/

Drake
5 Aug, 2023, 18:20

You might have a problem with 3rd party cookies. Either enable 3rd party cookies or set up your app and Appwrite such that Appwrite is a subdomain of your app

XaFigg
5 Aug, 2023, 18:22

Indeed, on Chrome it works correctly, but not Firefox :/

XaFigg
5 Aug, 2023, 18:22

It's a bit complicated to put a subdomain on the same domain as "localhost" lol

Drake
5 Aug, 2023, 18:22

Look for 3rd party cookie settings

Drake
5 Aug, 2023, 18:23

You could update your hosts file to have a local domain

XaFigg
5 Aug, 2023, 18:24

It's actually a good idea ^^

XaFigg
5 Aug, 2023, 18:26

Well, in the end, the problem was just the cookies... Lol Thank you for your help ^^

XaFigg
5 Aug, 2023, 18:35

Like this, is it correct?

XaFigg
5 Aug, 2023, 18:41

Do you know if there is a way to bypass the CORS error?

XaFigg
5 Aug, 2023, 18:41

Because the request is made from the Appwrite SDK, so I don't have control over the headers.

Drake
5 Aug, 2023, 18:42

What error are you getting?

XaFigg
5 Aug, 2023, 18:42
Drake
5 Aug, 2023, 18:43

Did you browse to Appwrite.localhost and accept the self signed certificate?

XaFigg
5 Aug, 2023, 18:50

Firefox ignores the hosts file despite the recommended settings. I will search again

XaFigg
5 Aug, 2023, 18:52

Okay good, browsers don't like domains like ".localhost"

Drake
5 Aug, 2023, 19:02

You can use any domain since it's just local testing

XaFigg
5 Aug, 2023, 19:06

According to this answer, some local domains are not valid.

But let's move on, thanks to your solutions I was finally able to have a functional application :D

Drake
5 Aug, 2023, 19:07

Sorry I mean use something like example.com

XaFigg
5 Aug, 2023, 19:07

Ohhh okay

XaFigg
5 Aug, 2023, 19:11

[Solved] Nuxt 3 | OAuth callback URL

XaFigg
5 Aug, 2023, 19:11

[SOLVED] Nuxt 3 | OAuth callback URL

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more