Skip to content

Commit

Permalink
fix for mpclarkson#37
Browse files Browse the repository at this point in the history
  • Loading branch information
fehguy committed Aug 11, 2023
1 parent 2f85579 commit 101caf2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/StravaSwift/StravaClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ extension StravaClient: ASWebAuthenticationPresentationContextProviding {
- Returns: a boolean that indicates if this url is for Strava, has a code and can be handled properly
**/
public func handleAuthorizationRedirect(_ url: URL) -> Bool {
if let redirectUri = config?.redirectUri, url.absoluteString.starts(with: redirectUri),
if let redirectUri = config?.redirectUri.components(separatedBy: "%3A%2F%2F").joined(separator: "://"), url.absoluteString.starts(with: redirectUri),
// if let redirectUri = config?.redirectUri, url.absoluteString.starts(with: redirectUri),
let params = url.getQueryParameters(), params["code"] != nil, params["scope"] != nil, params["state"] == "ios" {

self.handleAuthorizationRedirect(url) { result in
Expand Down

0 comments on commit 101caf2

Please sign in to comment.