Skip to content

Commit

Permalink
updated labels
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Jiang committed May 17, 2016
1 parent cb0330e commit f4909be
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Simplicity/LoginProviders/Facebook.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ public class Facebook: OAuth2LoginProvider {

// Get the access token, and check that the state is the same
guard let accessToken = url.fragmentDictionary["access_token"] where url.fragmentDictionary["state"] == "\(state)" else {
callback?(authToken: nil, error: nil)
callback?(accessToken: nil, error: nil)
return
}

callback?(authToken: accessToken, error: nil)
callback?(accessToken: accessToken, error: nil)
}

public init() {
Expand Down
6 changes: 4 additions & 2 deletions Simplicity/OAuth2LoginProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public extension OAuth2Scopes {
}
}

public enum OAuth2GrantType {
case AuthorizationCode, Implicit, Custom
public enum OAuth2GrantType: String {
case AuthorizationCode = "authorization_code",
Implicit = "implicit",
Custom = ""
}
2 changes: 1 addition & 1 deletion Simplicity/Simplicity.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import UIKit
import SafariServices

public typealias ExternalLoginCallback = (authToken: String?, error: NSError?) -> Void
public typealias ExternalLoginCallback = (accessToken: String?, error: NSError?) -> Void

public class Simplicity: NSObject {
static var currentLoginProvider: LoginProvider?
Expand Down

0 comments on commit f4909be

Please sign in to comment.