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

IOS Logout Crash : The service configuration is missing an end_session_endpoint. #806

Open
bydevelopertr opened this issue Nov 27, 2023 · 4 comments
Labels
bug triage Issues that need to be triaged

Comments

@bydevelopertr
Copy link

Hi Guys,

I crash while trying to logout :

*** Assertion failure in -[OIDEndSessionRequest endSessionRequestURL], OIDEndSessionRequest.m:184

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'The service configuration is missing an end_session_endpoint.'
*** First throw call stack:
(
0 CoreFoundation 0x0000000180437330 __exceptionPreprocess + 172
1 libobjc.A.dylib 0x0000000180051274 objc_exception_throw + 56
2 Foundation 0x0000000180ae29b4 _userInfoForFileAndLine + 0
3 ....

My Request:

let authorizationEndpoint = URL(string: Constants.ApiGa.authorizationEndpoint)!
let tokenEndpoint = URL(string: Constants.ApiGa.tokenEndpoint)!
let configuration = OIDServiceConfiguration(authorizationEndpoint: authorizationEndpoint,
tokenEndpoint: tokenEndpoint)

    var redirectURL = redirectURL = Constants.OIDAuthorization.redirectURL
    var idToken = "" idToken = KeyChain.getKeychainValue(value: "my_idToken")
    
    let request = OIDEndSessionRequest(configuration: configuration,
                                                idTokenHint: idToken,
                                                postLogoutRedirectURL: URL(string: redirectURL)!,
                                                additionalParameters: nil)

Please Help :/

@bydevelopertr bydevelopertr added bug triage Issues that need to be triaged labels Nov 27, 2023
@fbaumgart
Copy link

Did you do endpoint setup by discovery? Or you declared endpoints manually?

@bydevelopertr
Copy link
Author

Did you do endpoint setup by discovery? Or you declared endpoints manually?

I didn't understand what you said. Have you logged out using this library before? If so, can you share sample code?

@fbaumgart
Copy link

fbaumgart commented Jan 9, 2024

The crash logs are quite explicit - you need to specify to end_session_endpoint in the configuration.
OIDServiceConfiguration contains this one and you probably didn't assign it.

@bydevelopertr
Copy link
Author

The crash logs are quite explicit - you need to specify to end_session_endpoint in the configuration. OIDServiceConfiguration contains this one and you probably didn't assign it.

Can you explain with example swift code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Issues that need to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants