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] Outlook oauth account invalid redirect url query #1463

Open
WEGIII opened this issue Mar 5, 2025 · 5 comments
Open

🐛 [Bug] Outlook oauth account invalid redirect url query #1463

WEGIII opened this issue Mar 5, 2025 · 5 comments
Labels
bug something is wrong in Cypht

Comments

@WEGIII
Copy link

WEGIII commented Mar 5, 2025

🐛 Bug

The redirect variable "http://localhost/?page=home" is not accepted in certain Azure app configs.
The Azure app redirect URL is not allowed to have a query in it unless the app is only for work or school accounts. See here: https://learn.microsoft.com/en-us/entra/identity-platform/reply-url.

I was able to complete the oauth GMAIL app setup as they took the queried redirect URL. I did modify the redirect URL to match my domain.

If I am misunderstanding this or there is a known fix, please advise. Thanks!

Version & Environment

Rev: cypht/cypht:2.4.0

OS: Docker Install

@WEGIII WEGIII added the bug something is wrong in Cypht label Mar 5, 2025
@christer77
Copy link
Member

Hello @WEGIII ,

Thank you for this issue.

which messaging service are you trying with?
Gmail or Outlook or Office365 or..?

@christer77
Copy link
Member

If is outlook oauth
set your client_id, client_secret and redirect_url(client_uri)
#aoutlook
OUTLOOK_CLIENT_ID=your client_id
OUTLOOK_CLIENT_SECRET=your client_secret
OUTLOOK_CLIENT_URI=http://localhost:8800/
OUTLOOK_AUTH_URI=https://login.live.com/oauth20_authorize.srf
OUTLOOK_TOKEN_URI=https://login.live.com/oauth20_token.srf
OUTLOOK_REFRESH_URI=https://login.live.com/oauth20_token.srf

@WEGIII
Copy link
Author

WEGIII commented Mar 13, 2025

Outlook.com

It seems using the port made some type of progress, but is still not working. MS Azure accepted the port as part of the redirect URI.

When trying to add the email account via outlook using OUTLOOK_CLIENT_URI=http://localhost:8800/ connection is refused.
When trying to add the email account via outlook using OUTLOOK_CLIENT_URI=https://DOMAIN:8800/ connection times out.

Unfortunately, no errors in the container log, any ideas?

@christer77
Copy link
Member

Outlook.com

It seems using the port made some type of progress, but is still not working. MS Azure accepted the port as part of the redirect URI.

When trying to add the email account via outlook using OUTLOOK_CLIENT_URI=http://localhost:8800/ connection is refused. When trying to add the email account via outlook using OUTLOOK_CLIENT_URI=https://DOMAIN:8800/ connection times out.

Unfortunately, no errors in the container log, any ideas?

Use of the port? No, that's my way of accessing the CYPTH application in localhost. If your URL doesn't require the port to access it, you won't need to populate the port.

@WEGIII
Copy link
Author

WEGIII commented Mar 13, 2025

I am able to access the application via domain or localhost. The concern is while trying to add the oauth redirect URI to the Azure app. In the screenshot below, Azure, this is where the redirect variable "http://localhost/?page=home" is not accepted due to it being a query string.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something is wrong in Cypht
Projects
None yet
Development

No branches or pull requests

2 participants