File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -399,7 +399,7 @@ extension Router: URLRequestConvertible {
399399 static var appAuthorizationUrl : URL {
400400 let baseUrl = " strava://oauth/mobile/authorize "
401401 let authParams = StravaClient . sharedInstance. authParams
402- . map { " \( $0. key) = \( $0. value) " }
402+ . map { " \( $0. key) = \( " \( $0. value) " . addingPercentEncoding ( withAllowedCharacters : . urlHostAllowed ) ! ) " }
403403 . joined ( separator: " & " )
404404 return URL ( string: " \( baseUrl) ? \( authParams) " ) !
405405 }
@@ -410,7 +410,7 @@ extension Router: URLRequestConvertible {
410410 static var webAuthorizationUrl : URL {
411411 let baseUrl = " https://www.strava.com/oauth/authorize "
412412 let authParams = StravaClient . sharedInstance. authParams
413- . map { " \( $0. key) = \( $0. value) " }
413+ . map { " \( $0. key) = \( " \( $0. value) " . addingPercentEncoding ( withAllowedCharacters : . urlHostAllowed ) ! ) " }
414414 . joined ( separator: " & " )
415415 return URL ( string: " \( baseUrl) ? \( authParams) " ) !
416416 }
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ extension StravaClient: ASWebAuthenticationPresentationContextProviding {
104104 } else {
105105 if #available( iOS 12 . 0 , * ) {
106106 let webAuthenticationSession = ASWebAuthenticationSession ( url: Router . webAuthorizationUrl,
107- callbackURLScheme: config? . redirectUri,
107+ callbackURLScheme: config? . redirectUri. addingPercentEncoding ( withAllowedCharacters : . urlHostAllowed ) ! ,
108108 completionHandler: { ( url, error) in
109109 if let url = url, error == nil {
110110 self . handleAuthorizationRedirect ( url, result: result)
You can’t perform that action at this time.
0 commit comments