openid / openid/AppAuth-iOS

Logout support for external Revocation Endpoint

Open
#255 24 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Objective-C
Stars
2k
Forks
867
Avg merge
4d 48m
Merged PRs (30d)
1

Description

Is your feature request related to a problem? Please describe.

During the logout process, I am invoking the authorize call (authStateByPresentingAuthorizationRequest in OIDAuthState) with the revocation endpoint. The browser opens, but since I do not receive an authorizationCode in return because its a logout action, the exception thrown on line 204 of OIDAuthorizationResponse crashes my app.

Describe the solution you'd like
I think there should be a configuration check to see if a logout action is being performed, in which case to return nil instead of throwing an uncaught exception.

Describe alternatives you've considered
I am not able to wrap the callback I send in with a try catch because this exception is thrown within the library, prior to the callback being invoked.
I have a fork of this library now that wraps the tokenExchangeRequest made from OIDAuthState in a try catch, and in turn invokes the callback with a nil authState

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with authStateByPresentingAuthorizationRequest in OIDAuthState and the exception on line 204 of OIDAuthorizationResponse. Compare the tokenExchangeRequest handling in the reporter’s fork and trace how the callback is reached during logout. Done means an external revocation-endpoint logout does not crash when no authorizationCode is returned and the callback receives nil authState.

Written by the indexing model from the issue text.

Assessment

Tech stack
objective-c
Domain
authentication, mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.