My application deployed to single server, the ports 80/443 already busy by front-end of application.
Backend deployed to the same server at 8443 port. Unfortunately I should use it inside of client URL like https://appwrite.mydomain.com:8443/. I try to login with OAuth, afterwards it tries redirect me to https://appwrite.mydomain.com/ instead of using port at the end, and oauth can't complete successfuly.
Before backend was deployed to 80/443 and it works as expected, while port was changed and passed to client URL it stopped work.
The question is: Why appwrite didn't add "8443" port at the end while processing OAuth? Which possible solution do I have?
I'm not a 100% sure, but I think this is an OAuth issue, and not an Appwrite one.
The reason why it worked when backend was on 80/443, is because you don't need to specify the port numbers in the URL for these ports. When you make a plain http request to example.com
, it will automatically look at port 80, as it's the standard port for HTTP. Same goes for 443 with HTTPS requests.
8443 is widely used as an alternative to 443, but it's not a standard. With OAuth, I don't think you are allowed to use port numbers in the URL.
That being said, there is another way you can try. Considering your frontend app is on frontend.example.com
80/443, you can create another subdomain backend.example.com
and make appwrite listen to ports 80 and 443 of this subdomain
Hope I was clear lol
Thanks, closed. 👍
[SOLVED] Have an issue with OAuth while using 8443 port
Recommended threads
- Update User Error
```ts const { users, databases } = await createAdminClient(); const session = await getLoggedInUser(); const user = await users.get(session.$id); if (!use...
- apple exchange code to token
hello guys, im new here 🙂 I have created a project and enabled apple oauth, filled all data (client id, key id, p8 file itself etc). I generate oauth code form...
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...