Back

oauth issues

  • 0
  • Web
Lucky Klyist
18 Oct, 2023, 19:25

I am experiencing issues with the OAuth part of Appwrite. Sometimes, I encounter a 500 error after executing the OAuth process. At other times, the OAuth provider page takes too long to open. Even after redirecting to the success URL, I am unable to fetch the sessions.

U have implemented in this way using it in the methods :

TypeScript
async githubLogin() {
    try {
      return this.account.createOAuth2Session(
        "github",
        "http://localhost:5173/blogs",
        "http://localhost:5173/login"
      );
    } catch (error) {
      throw error;
    }
  }

  async getAccount() {
    try {
      return this.account.getSession("current");
    } catch (error) {
      throw error;
    }
  }

Is there any error over here or some parts I am missing?

TL;DR
The user is experiencing issues with the OAuth process in Appwrite. They sometimes encounter a 500 error and the OAuth provider page takes a long time to open. Even after redirecting to the success URL, they are unable to fetch the sessions. Possible solutions: - Update browser settings to allow 3rd party cookies - Set up a custom domain that is a sub-domain of the app - Search for previous support posts about the problem with 3rd party cookies - Check the implementation of the OAuth methods, ensure there are no errors or missing parts.
Drake
18 Oct, 2023, 19:38

You might be experiencing a problem with 3rd party cookies. There should be previous support posts about that

Lucky Klyist
19 Oct, 2023, 12:44
Lucky Klyist
19 Oct, 2023, 12:45

after the redirect i am getting this type of log for priting the user sessions

Lucky Klyist
19 Oct, 2023, 12:47

did'nt found that forum what was the title of it , so i can search it ?

Drake
19 Oct, 2023, 18:19

You can either:

  1. Update your browser settings to allow 3rd party cookies
  2. Set up a custom domain that is a sub-domain of your app
VincentGe
19 Oct, 2023, 18:34

☝️ What steven said.

VincentGe
19 Oct, 2023, 18:34

Browsers block third party cookies, and they won't work on localhost anyway 😅

Lucky Klyist
20 Oct, 2023, 03:31

thanks @Steven @VincentGe

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