Back

[SOLVED] Login with Oauth not working on a self hosted Appwrite install

  • 0
  • General
  • Accounts
  • Web
Vishal Lohar
30 Jul, 2023, 09:29

Hi, I am building a web application on example.com. And I have self-hosted the appwrite console on the app.example.com subdomain.

When I tested the login system I got a few problems where I need your help. The login system is working fine and a session is created when tried to log in. But the appwrite web sdk is somehow not able to get the account details after login.

So, I am getting a 401 error when I try to access account details after login. I guess that it has something to do with cookies. May be my self-hosted setup has some problems and is not able to set cookies.

I need your help to fix this!

TL;DR
User is experiencing issues with login using OAuth on a self-hosted Appwrite install. The issue was resolved by setting the SSL settings to full SSL. User also asked about using Appwrite with Cloudflare proxy and was able to fix the issue by setting Cloudflare to DNS only and following the guide provided in the thread. User also encountered a problem with the login system not being able to retrieve account details after login, resulting in a 401 error. The user suspects an issue with cookies and seeks help to fix it.
Drake
30 Jul, 2023, 17:32

Do you have a reverse proxy? Are you using https for everything?

Vishal Lohar
31 Jul, 2023, 02:56

@Steven Yes, I am using Cloudflare.

Drake
31 Jul, 2023, 03:42

I think you might need to set the SSL settings to flexible or something so that the connection between cloudflare and Appwrite uses https

Vishal Lohar
31 Jul, 2023, 05:05

SSL settings is set to flexible but not working.

Vishal Lohar
31 Jul, 2023, 05:07

I managed to fix it by setting cloudflare to DNS only and using this guide - https://appwrite.io/docs/certificates

Vishal Lohar
31 Jul, 2023, 05:08

Still, I want to know, is it possbile to use appwrite with cloudflare proxy?

Drake
31 Jul, 2023, 17:11

yes, you should be able to

Vishal Lohar
1 Aug, 2023, 12:45

Okay, Its working if i set to full ssl

Drake
1 Aug, 2023, 16:27

great! can i mark this as solved now?

Vishal Lohar
1 Aug, 2023, 16:32

YesπŸ‘

Drake
1 Aug, 2023, 16:51

[SOLVED] Login with Oauth not working on a self hosted Appwrite install

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