Support OpenID login
After having signed up using OpenID I’m unable to login on GoMap. I have no user name.
We could allow users to authenticate using OAuth, which would use the login dialog from the OSM website.
I've long been waiting for Apple to support OAuth as a built-in framework, but I guess that's not going to happen. If someone wants to submit a patch using https://github.com/OAuthSwift/OAuthSwift that would be great.
Since iOS 12 there is at least an better handling oAuth login/setup.
Would it make sense if I switch to this approach? Imho it would make the whole callback handling much better.
I guess I should have closed this when I added the OAuth support. Do you think there's much advantage to switching to the Apple framework? What we have now works but I don't have any experience with ASWebAuthenticationSession.
I see the main benefit in the auth response handling. You don't have to do the dance between the app delegate and the OAuth2 service. You initialize an auth session and after the user successfully authenticates you get the response (including the code parameter) in a completion block.
I think we just have to touch func requestAccessFromUser() and can remove the code in the AppDelegate and make func redirectHandler() private.
I have no idea if it is worth it? I could create a PR if you wish.
It's up to you! Sounds like there's no downside so I'll merge it if you do it.
I played a little bit around, but since ASWebAuthenticationPresentationContextProviding is only available with iOS 13 I would recommend switching to ASWebAuthenticationSession if the deployment target is >= iOS 13. Are there any plans to drop iOS 12 support?
There are still people using iOS 12 (primarily iPod Touch devices as far as I can tell) so I'm trying to support that until it gets too painful. I just raised the minimum version to iOS 12 from iOS 9.
Q: @patricks Is there a way to include multiple login functions, where it starts with the “best” available (for latest iOS),
then tries each in turn until it gets to one that works ?
@jwmh yes this would be possible. But we have to support these two ways until we drop the support of the older iOS version. So if there is no really benefit I wouldn’t recommend this. Is there any reason why the new „Apple way“ should be supported?