[WIP] Add OAuth2/OIDC logout support#145
Draft
michaelstingl wants to merge 4 commits into
Draft
Conversation
- Implement deauthenticateConnection method in OCAuthenticationMethodOAuth2 with token revocation (RFC 7009) - Add revocationEndpointURLForConnection method for endpoint discovery - Override deauthenticateConnection in OCAuthenticationMethodOpenIDConnect to use OIDC end_session_endpoint - Support proper OIDC logout flow with id_token_hint and post_logout_redirect_uri - Clear all authentication data and OIDC configuration on logout - Fallback to OAuth2 token revocation when OIDC logout endpoint not available 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
15 tasks
- Add OCAuthenticationMethodOpenIDConnectPostLogoutRedirectURI class setting - Document the setting with proper metadata for auto-documentation - Default to empty string, falls back to redirect URI if not configured - Allows customization of post-logout redirect behavior 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Use connection.authSignals instead of connection.bookmark.certificateStore.requiredSignals to match the pattern used in other authentication requests. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Use setValue:forHeaderField: instead of non-existent authorizationHeaderValue property 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR implements OAuth2/OIDC logout functionality in the iOS SDK. It adds proper token revocation support for OAuth2 (RFC 7009) and OIDC end session support, ensuring users are fully logged out at the identity provider level.
OAuth2 Implementation
deauthenticateConnection:withCompletionHandler:method toOCAuthenticationMethodOAuth2revocationEndpointURLForConnection:options:for endpoint discoveryOIDC Implementation
deauthenticateConnectionto use OIDC'send_session_endpointid_token_hint,post_logout_redirect_uri, andstateASWebAuthenticationSessionfor logout flowRelated Issue
Currently no issue exists for this feature. This addresses the missing logout functionality where users remain logged in at the IdP level after removing bookmarks.
Motivation and Context
The iOS app currently only removes local data when deleting bookmarks but doesn't perform proper logout at the identity provider. This is inconsistent with the web client behavior and leaves active sessions on the server.
How Has This Been Tested?
Screenshots (if appropriate):
N/A - Backend functionality
Types of changes
Checklist: