Instantly share code, notes, and snippets.

Embed
What would you like to do?
public func authorizationURL() -> URL?
{
var components = URLComponents(string:"https://api.trakt.tv/oauth/authorize")
let queryItems:[URLQueryItem]=[
URLQueryItem(name: "response_type", value: "code"),
URLQueryItem(name: "client_id", value: self.clientID),
URLQueryItem(name: "redirect_uri", value: self.redirecURL.absoluteString),
URLQueryItem(name: "state", value: " ")
]
components?.queryItems = queryItems
return components?.url
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment