最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Redirect URIs in Keycloak for a mobile app: extra slashes added - Stack Overflow

programmeradmin0浏览0评论

I’m trying to configure Keycloak for my mobile app, but I’m running into an issue with the redirect URIs. Specifically, when I configure a custom URI like myapp://tabs/home in Keycloak, the mobile app receives an error with a modified URI like myapp:///tabs/home. It seems that an extra slash (///) is being added to the redirect URI.

Here’s what I’ve done so far:

I configured the redirect URI in Keycloak as myapp://tabs/home in the client settings.

When I launch the mobile app, instead of receiving the correct URI myapp://tabs/home, it receives myapp:///tabs/home, which results in an error.

I’ve tried adding wildcards (*) to the URIs, but the issue persists.

Some details:

I’m using Keycloak for authentication via OIDC.

I’ve configured the Custom URL Scheme in the mobile app to handle custom URIs, but I still get the URI with an extra slash.

I’ve also tried:

Simplifying the redirect URI (e.g., myapp://), but I still get the same error.

Checking session and logout settings in Keycloak, but the problem remains.

Questions:

Has anyone experienced a similar issue with redirect URIs in Keycloak?

Is there a setting in Keycloak that might be causing the extra slash to be added? If so, how can I fix it?

Is there something I need to do in the mobile app configuration to correctly handle custom URIs without them being modified?

Any insights or similar experiences would be greatly appreciated! Thanks in advance!

I configured Keycloak for my mobile app using a custom redirect URI (myapp://tabs/home). I expected the app to receive the exact same URI after authentication, but instead, an extra slash (///) was added, resulting in myapp:///tabs/home, which causes an error.

Steps Taken: Set the redirect URI in Keycloak as myapp://tabs/home in the client settings.

Configured the mobile app to handle custom URL schemes.

Tried using wildcards (*) in the redirect URI, but the issue persisted.

Tested simpler redirect URIs (e.g., myapp://), but the extra slash issue remained.

Checked Keycloak’s session and logout settings for potential misconfigurations.

I suspect that Keycloak might be modifying the redirect URI format. I’m looking for guidance on whether this behavior is configurable or if additional mobile app settings are needed to handle the redirect properly.

Has anyone encountered a similar issue or found a workaround? Any insights would be greatly appreciated!

发布评论

评论列表(0)

  1. 暂无评论