DiscogsAPI icon indicating copy to clipboard operation
DiscogsAPI copied to clipboard

Authentication in auth view doesn't work with google login

Open nrivard opened this issue 8 years ago • 3 comments

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, so SFSafariViewController will get automatically launched instead? Otherwise, everyone will have to kick out to regular Safari using the custom callback scheme.

nrivard avatar Dec 08 '17 20:12 nrivard

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.

nrivard avatar Dec 14 '17 00:12 nrivard

Thanks for the report, I will update the readme then.

maxep avatar Dec 18 '17 21:12 maxep

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.

nrivard avatar Dec 19 '17 04:12 nrivard