Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Bug Report: OAuth2 does not add port number to redirect uri #2365

Open
2 tasks done
dro-1 opened this issue Oct 28, 2021 · 14 comments
Open
2 tasks done

🐛 Bug Report: OAuth2 does not add port number to redirect uri #2365

dro-1 opened this issue Oct 28, 2021 · 14 comments
Labels
bug Something isn't working good first issue Good for newcomers product / auth Fixes and upgrades for the Appwrite Auth / Users / Teams services.

Comments

@dro-1
Copy link

dro-1 commented Oct 28, 2021

👟 Reproduction steps

When I started my appwrite server, I set it to run on port 3000 for http and left all other values as their defaults.
I added Google OAuth by following all the required steps:

👍 Expected behavior

I expected the redirect URI to have port 3000

👎 Actual Behavior

I get an error saying:

image

and I noticed that the redirect_uri didn't have the port 3000 on it.

One of the maintainers helped track down the issue to line 292 in this file

🎲 Appwrite version

Different version (specify in environment)

💻 Operating system

Windows

🧱 Your Environment

I'm using version 0.11.0

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@dro-1 dro-1 added the bug Something isn't working label Oct 28, 2021
@dro-1
Copy link
Author

dro-1 commented Oct 29, 2021

Hello, Can I be assigned to this issue?

@eldadfux
Copy link
Member

I have assigned you to this issue, let me know if you need any help.

@dro-1
Copy link
Author

dro-1 commented Oct 29, 2021

I already opened a PR on it but couldn't write the proper tests as I'm a PHP noob.
Check the PR #2368

@skyface753
Copy link

Hello, I have the same problem. Is there any solution?

@stnguyen90
Copy link
Contributor

@skyface753, for now, I recommend exposing Appwrite on the standard ports. If you need other apps on the same server on standard ports, you can out a reverse proxy in front.

1 similar comment
@stnguyen90
Copy link
Contributor

@skyface753, for now, I recommend exposing Appwrite on the standard ports. If you need other apps on the same server on standard ports, you can out a reverse proxy in front.

@kilroyjones
Copy link

@stnguyen90 When you say exposing appwrite on the standard ports, I'm assuming that means 80/443, which won't work if you're developing locally, no? I see there was some progress made in the PR 2368.

@stnguyen90
Copy link
Contributor

@kilroyjones, what's wrong with running Appwrite on 80/443 locally?

@stnguyen90 stnguyen90 added the product / auth Fixes and upgrades for the Appwrite Auth / Users / Teams services. label Sep 29, 2022
@eq-devs
Copy link

eq-devs commented Jul 13, 2023

Hello, I have the same problem. Is there any solution?

@stnguyen90 stnguyen90 added the good first issue Good for newcomers label Jul 28, 2023
@KaranJagtiani
Copy link

Is this issue up for grabs? If yes, I would like to work on this @stnguyen90

@stnguyen90
Copy link
Contributor

@KaranJagtiani, as part of working on this, can you test how this behaves if there's a reverse proxy in front of appwrite?

Many people have configured Appwrite to run on non-standard ports like 8080 and 4443, but expose Appwrite nonstandard ports through a reverse proxy. It's crucial for the redirect to still use the ports from the original request that the reverse proxy receives.

@stnguyen90 stnguyen90 self-assigned this Sep 22, 2023
@krishnaa192
Copy link

Can I work on this issue?

@ahmadrayz007
Copy link

ahmadrayz007 commented Mar 13, 2024

Try to change the appwrite port to the standard one, i think it's 80:80 CMIIW
Because google says it's in localhost/v1, not in localhost:3000/v1
I think there is a mismatch between appwrite redirect url and google if we change the port.

@stnguyen90
Copy link
Contributor

@krishnaa192, are you still interested in working on this?

@stnguyen90 stnguyen90 removed their assignment Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers product / auth Fixes and upgrades for the Appwrite Auth / Users / Teams services.
Projects
None yet
Development

No branches or pull requests

9 participants