GoMap icon indicating copy to clipboard operation
GoMap copied to clipboard

Support OpenID login

Open julienrf opened this issue 11 years ago • 1 comments

After having signed up using OpenID I’m unable to login on GoMap. I have no user name.

julienrf avatar Sep 09 '14 11:09 julienrf

We could allow users to authenticate using OAuth, which would use the login dialog from the OSM website.

wtimme avatar Apr 13 '19 15:04 wtimme

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.

bryceco avatar Dec 19 '22 06:12 bryceco

Since iOS 12 there is at least an better handling oAuth login/setup.

ASWebAuthenticationSession

Would it make sense if I switch to this approach? Imho it would make the whole callback handling much better.

patricks avatar Feb 27 '23 21:02 patricks

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.

bryceco avatar Feb 28 '23 05:02 bryceco

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.

patricks avatar Feb 28 '23 06:02 patricks

It's up to you! Sounds like there's no downside so I'll merge it if you do it.

bryceco avatar Feb 28 '23 08:02 bryceco

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?

patricks avatar Feb 28 '23 19:02 patricks

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.

bryceco avatar Feb 28 '23 21:02 bryceco

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 avatar Jul 08 '23 11:07 jwmh

@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?

patricks avatar Jul 15 '23 05:07 patricks