Open nrivard opened 6 years ago
Looked into a bit and we can't use SFAuthenticationSession or SFSafariViewController bc Discogs uses OAuth 1. OAuth 1 needs headers in the HTTP request to be filled out but there is no URLRequest use with either of those two classes, just a URL.
Thanks for the report, I will update the readme then.
My fork is a bit too out of step with master
(or I'd submit a PR) but you can see my solution here: https://github.com/nrivard/DiscogsAPI/commit/e5c328b937e48c1d9d204c70463139f6a5e65e68
When I get time I will try to resolve my fork with your work but if you want to cherry-pick this I wouldn't mind. Tested against ios 10 and 11 in various scenarios.
My app was rejected by Apple because Google requires their login flow to occur in a system browser, not as part of a webview in a 3rd party app. Not sure what the best solution is here. Perhaps best to explore use of
SFAuthenticationSession
here, soSFSafariViewController
will get automatically launched instead? Otherwise, everyone will have to kick out to regular Safari using the custom callback scheme.