[GH-ISSUE #668] Feature Request - Add id_token support to OAuthSwiftCredential #435

Open
opened 2026-03-03 16:48:40 +03:00 by kerem · 1 comment
Owner

Originally created by @MikeSpelling on GitHub (Jul 13, 2021).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/668

Description:

In order to support single-sign out with a redirect endpoint you need access to the original id_token received during authentication (https://identityserver4.readthedocs.io/en/latest/endpoints/endsession.html#refendsession).
It seems like this should be easy enough to add to the OAuthSwiftCredential object as an optional String.
Around line 122 of OAuth2Swift for example (where the access_token is set) the id_token could also be added?

OAuth Provider? (Twitter, Github, ..):

Custom - using our own Identity Server

OAuth Version:

  • Version 1
  • Version 2

OS (Please fill the version) :

  • iOS :
  • OSX :
  • TVOS :
  • WatchOS :

Installation method:

  • Carthage
  • CocoaPods
  • Swift Package Manager
  • Manually

Library version:

  • head
  • v2.1.0
  • v2.0.0
  • v1.4.1
  • other: (v2.2.0)

Xcode version:

  • 11.4 (Swift 5.2)
  • 11.x (Swift 5.1)
  • 10.x (Swift 5.0)
  • other: (Xcode 12.5.1, Swift 5.4)
  • objective c
Originally created by @MikeSpelling on GitHub (Jul 13, 2021). Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/668 ### Description: In order to support single-sign out with a redirect endpoint you need access to the original `id_token` received during authentication (https://identityserver4.readthedocs.io/en/latest/endpoints/endsession.html#refendsession). It seems like this should be easy enough to add to the `OAuthSwiftCredential` object as an optional String. Around line 122 of OAuth2Swift for example (where the `access_token` is set) the `id_token` could also be added? ### OAuth Provider? (Twitter, Github, ..): Custom - using our own Identity Server ### OAuth Version: - [ ] Version 1 - [x] Version 2 ### OS (Please fill the version) : - [x] iOS : - [ ] OSX : - [ ] TVOS : - [ ] WatchOS : ### Installation method: - [ ] Carthage - [x] CocoaPods - [ ] Swift Package Manager - [ ] Manually ### Library version: - [ ] head - [ ] v2.1.0 - [ ] v2.0.0 - [ ] v1.4.1 - [x] other: (v2.2.0) ### Xcode version: - [ ] 11.4 (Swift 5.2) - [ ] 11.x (Swift 5.1) - [ ] 10.x (Swift 5.0) - [x] other: (Xcode 12.5.1, Swift 5.4) - [ ] objective c
Author
Owner

@colinhumber commented on GitHub (Oct 7, 2021):

I've added support for this in https://github.com/OAuthSwift/OAuthSwift/pull/679

<!-- gh-comment-id:937860778 --> @colinhumber commented on GitHub (Oct 7, 2021): I've added support for this in https://github.com/OAuthSwift/OAuthSwift/pull/679
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/OAuthSwift#435
No description provided.