Alex601t / Catamaran

An easy way to get Social Networks authenticating by OAuth 2.0 on Objective-C via UIWebView. Supported social networks: Google, Facebook, Foursquare, linkedin, Instagram, Mail.ru, ok.ru, Yandex, VK, GitHub

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: grant_type is not hardcoded

gerchicov-bp opened this issue · comments

You hardcoded "grant_type=password" or "grant_type=authorization_code"

For example Twitch:
https://dev.twitch.tv/docs/authentication#oauth-client-credentials-flow-app-access-tokens
"grant_type" has a lot of types and it could be probably better to add this param as setting or allow to override it but not to rewrite the whole methods

@gerchicov-bp Hey! Thx for the suggestion.

You can override methods and manipulate URL (for grand type) like this
https://github.com/Alex601t/Catamaran/blob/master/Catamaran/Logic/SocialNetworks/GitHub/CATGitHubOAuth.m

But you're right, the code needs refactoring for more convenience. Maby you want to contribute ? :)