-
Notifications
You must be signed in to change notification settings - Fork 168
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
Could someboby tell me what the format of the redirect_uri should be when configuring OIDC? #83
Comments
Hi @vitaaaaa1, thanks for your interest in Huly. Fair question, currently the docs are missing this bit. I'll update them to mention that. You should be using |
Thank you for your response. Yesterday, I did get the URL in the format you described, even though I didn't fill in the redirect_uri, but when I clicked Continue with OpenId on the Huly login page, I was redirected to Authentik and then back to the Huly login page without any changes. I don't know what happened in between.
|
@vitaaaaa1 redirect to the login page in Huly means unsuccessful auth or error on the IdP side. I'd expect the account service logs to have this error but your logs show nothing useful for some reason. If you can check events log on the IdP side you may probably find an issue logged here. You can also try to check the browser logs (network tab) for failed requests. |
I am using the Docker Compose file provided by you to deploy my application, and the default OIDC redirect URL is set to: FRONT_URL=http://front:8080. I later changed it to my host IP address. If you don't define it as the host IP address, it actually makes a direct browser request, rather than through the network in the Docker container. This part is strange, and I don't know if the problem is here, or what the purpose of this parameter is. I changed this parameter to the external access address of the front-end - FRONT_URL=http://10.8.0.84:8087. At least the redirect during runtime is normal, but I am not sure if this redirect is the correct one. |
Yes, the external access address for FRONT_URL is a correct choice. There are three redirects involved in OIDC auth:
In your case it looks like it made it to 3. where it redirects to the front login page due to unsuccessful auth on IdP side. |
But neither Authentik nor huly reported error logs, I'll have to look into it again, thanks for your reply |
Hello, I noticed that the official documentation for OIDC configuration has been updated, but I'm not sure how to configure the parameters to get information related to my OIDC authentication failure.
|
@vitaaaaa1 what is your IdP redirect URL currently set to? |
The redirection URL has not been modified and still uses the following URL: http://example.domain/auth/openid/callback |
I think this is the problem. This URL should be set to |
"Account service source address" refers to the IP address from which the account service is being accessed, typically port 3000.
But the callback url I configured in the Idp does already carry 3000 ports These are the configuration parameters for the account service
|
What callback URL did you configure and where if the redirection URL is kept default? |
The callback url is automatically obtained by my IdP service Authentik in the following format: |
Could you try to put that same URL as the redirect URL in your IdP config manually? I believe they must match, otherwise you'll be getting the error you see. |
I use Authentik as my OIDC provider, and I set the redirect_uri format in Authentik to "https://your-huly-instance.com/auth/callback" for callback when authentication is verified in Authentik. However, I get an error when logging in. "The request fails due to a missing, invalid, or mismatching redirection URI (redirect_uri)."
The text was updated successfully, but these errors were encountered: