Skip to content

Commit

Permalink
Merge pull request vapor-community#40 from Appsaurus/appsaurus/facebo…
Browse files Browse the repository at this point in the history
…ok/scope-bug-fix

Applying facebook scope parameters to OAuth request.
  • Loading branch information
rafiki270 authored May 22, 2019
2 parents b60f0e7 + ea03d14 commit 1ad6a9b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/Imperial/Services/Facebook/FacebookRouter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ public class FacebookRouter: FederatedServiceRouter {
public func authURL(_ request: Request) throws -> String {
return "https://www.facebook.com/v3.2/dialog/oauth?" +
"client_id=\(self.tokens.clientID)" +
"&redirect_uri=\(self.callbackURL)"
"&redirect_uri=\(self.callbackURL)" +
"&scope=\(scope.joined(separator: "%20"))" +
"&response_type=code"
}

public required init(callback: String, completion: @escaping (Request, String) throws -> (Future<ResponseEncodable>)) throws {
Expand Down

0 comments on commit 1ad6a9b

Please sign in to comment.