[GH-ISSUE #426] Issues with LinkedIn redirect url. How to handle "http" based redirect URLs? #276

Closed
opened 2026-03-03 16:47:18 +03:00 by kerem · 2 comments
Owner

Originally created by @mervyn777 on GitHub (Dec 21, 2017).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/426

Description:

Looking at your demo project you have used "http" based redirect url (i.e http://oauthswift.herokuapp.com/callback/linkedin2) to get token from LinkedIn. So how can we handle this scheme on our app when the oauth code is returned back by the SFSafariViewController?

Your documentation only specifies custom scheme that the app can handle.

I tried setting up a custom redirect uri on LinkedIn page but it doesn't provide that option. It only accepts https based uri.

OAuth Provider (Twitter, Github, ..):

LinkedIn

OAuth Version:

  • Version 1
  • Version 2

OS (Please fill the version) :

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

Installation method:

  • Carthage
  • CocoaPods
  • Manually

Library version:

  • head
  • v1.2 (Swift 4.0)
  • v1.0.0
  • v0.6
  • other: (Please fill in the version you are using.)

Xcode version:

  • 9.0 (Swift 4.0)

  • 9.0 (Swift 3.2)

  • 8.x (Swift 3.x)

  • 8.0 (Swift 2.3)

  • 7.3.1

  • other: (Please fill in the version you are using.)

  • objective c

Originally created by @mervyn777 on GitHub (Dec 21, 2017). Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/426 ### Description: Looking at your demo project you have used "http" based redirect url (i.e `http://oauthswift.herokuapp.com/callback/linkedin2`) to get token from LinkedIn. So how can we handle this scheme on our app when the oauth `code` is returned back by the `SFSafariViewController`? Your documentation only specifies custom scheme that the app can handle. I tried setting up a custom redirect uri on LinkedIn page but it doesn't provide that option. It only accepts `https` based uri. ### OAuth Provider (Twitter, Github, ..): LinkedIn ### OAuth Version: - [ ] Version 1 - [x] Version 2 ### OS (Please fill the version) : - [x] iOS : - [ ] OSX : - [ ] TVOS : - [ ] WatchOS : ### Installation method: - [ ] Carthage - [x] CocoaPods - [ ] Manually ### Library version: - [x] head - [ ] v1.2 (Swift 4.0) - [ ] v1.0.0 - [ ] v0.6 - [ ] other: (Please fill in the version you are using.) ### Xcode version: - [x] 9.0 (Swift 4.0) - [ ] 9.0 (Swift 3.2) - [ ] 8.x (Swift 3.x) - [ ] 8.0 (Swift 2.3) - [ ] 7.3.1 - [ ] other: (Please fill in the version you are using.) - [ ] objective c
kerem closed this issue 2026-03-03 16:47:19 +03:00
Author
Owner

@mervyn777 commented on GitHub (Dec 21, 2017):

Found my solution here: https://github.com/OAuthSwift/OAuthSwift/wiki/API-with-only-HTTP-scheme-into-callback-URL

<!-- gh-comment-id:353486753 --> @mervyn777 commented on GitHub (Dec 21, 2017): Found my solution here: https://github.com/OAuthSwift/OAuthSwift/wiki/API-with-only-HTTP-scheme-into-callback-URL
Author
Owner

@aakarshsasi commented on GitHub (Feb 5, 2020):

Did you do with it Safari Controller or had to switch to webview?

<!-- gh-comment-id:582225276 --> @aakarshsasi commented on GitHub (Feb 5, 2020): Did you do with it Safari Controller or had to switch to webview?
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#276
No description provided.