Hello All,
I am developing one iPhone app in which I need to implement login with hubspot.
To implement this, I used oauth2 library in swift. In this I am using below code to do authorization.
When I run the app, its navigating me to safari and asking to enter id and passwrod of Hubspot. When I enter it, its just keep me inside the website and showing 3 dots loading. Please check this screenshot for the same: https://tinyurl.com/y3trpphr
func getAccess()
{
let oauthswift = OAuth2Swift(
consumerKey: “****”,
consumerSecret: “****”,
authorizeUrl: “https://app.hubspot.com/oauth/authorize”,
accessTokenUrl: “https://api.hubapi.com/oauth/v1/token”,
responseType : “code”
)
oauthswift.authorize(withCallbackURL: URL(string: “myapp://”), scope: “contacts”, state:“code”, success: { (credentials, response, parameters) in
print(response as Any)
}, failure: { (error) in
print(error)
})
}