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

EndSessionRequest is not being redirected to the app. #1093

Open
6 tasks done
MrudulaAmirneni opened this issue Oct 2, 2024 · 2 comments
Open
6 tasks done

EndSessionRequest is not being redirected to the app. #1093

MrudulaAmirneni opened this issue Oct 2, 2024 · 2 comments
Labels

Comments

@MrudulaAmirneni
Copy link

MrudulaAmirneni commented Oct 2, 2024

Checklist:

  • I am using the latest release
  • I searched for existing GitHub issues
  • I read the documentation
  • I verified the client configuration matches the information in the identity provider (or I am using dynamic client registration)
  • I am either using a custom URI scheme or https with App Links for client redirect.
  • I can reproduce the issue in the demo app (optional)

Configuration

  • Version: 0.11.1
  • Integration: Kotlin
  • Identity provider: Ac

Issue Description

We have used this library to implement OIDC for one of the identity providers. Authentication and fetching the token is working fine. We are working on implementing logout (end session) functionality to make sure the cookies are cleared by the identity provider.

This is the sample URL provided by our identity provider.

https://?client_id=*********1234hdghd&logout_uri=com.xyz:/logout

val endSessionIntent: Intent = authService.getEndSessionRequestIntent(
EndSessionRequest.Builder(
OIDCConfig.getServiceConfigLogout()
).setState(null)
.setAdditionalParameters(
mapOf(
OIDCConfig.CLIENT_ID_KEY to OIDCConfig.CLIENT_ID,
OIDCConfig.LOGOUT_URI_KEY to OIDCConfig.LOGOUT_REDIRECT_URI
)
).build()
)
oIDCLogoutResultLauncher.launch(endSessionIntent)

image

I am using above code to achieve it, I am able to launch the custom tabs but the screen shows this error. Is the error caused by app auth library as its missing something or coming from our identity provider. Any help is appreciated. Thanks

@MrudulaAmirneni
Copy link
Author

Sorry this is the sample logout uri >> https://?client_id=********19283jd&logout_uri=com.xyz:/logout

@rribeiro1
Copy link

The example from README worked for me. Maybe you could try replacing the setAdditionalParameters with setIdTokenHint and setPostLogoutRedirectUri

EndSessionRequest endSessionRequest =
    new EndSessionRequest.Builder(authorizationServiceConfiguration)
        .setIdTokenHint(idToken)
        .setPostLogoutRedirectUri(endSessionRedirectUri)
        .build();

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

No branches or pull requests

2 participants