Skip to content

Instantly share code, notes, and snippets.


fitomad/oauth-url.swift Secret

Created Sep 2, 2018
What would you like to do?
public func authorizationURL() -> URL?
var components = URLComponents(string:"")
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