generic-oauth2 icon indicating copy to clipboard operation
generic-oauth2 copied to clipboard

ASWebAuthenticationSession Support?

Open xcskier56 opened this issue 4 years ago • 7 comments

Description

Does this plugin support using ASWebAuthenticationSession? I know that OauthSwift, which this plugin is using does, but in my testing, it seems that a regular Safari View is used instead of the ASWebauthenticationSession. I'm a web dev so only moderately understand the swift code, but it appears to me that a SafariURLHandler is being used instead of the ASWebauthenticationSession. Is this the case?

xcskier56 avatar Oct 14 '20 19:10 xcskier56

What is the advantage of ASWebAuthenticationSession @xcskier56 ?

phal0r avatar Sep 03 '21 16:09 phal0r

I for my part can not answer this question either.

@xcskier56 please explain the advantages of ASWebAuthenticationSession.

I keep this issue open a few days and close it afterwards if there is no feedback.

BR

moberwasserlechner avatar Sep 30 '21 14:09 moberwasserlechner

I did some investigation and ASWebAuthenticationSession should be used as it is more secure and provides better usability by sharing cookies and password autocompletion.

See: https://authguidance.com/2020/02/22/ios-code-sample-overview/

Also, I think it is correct, that OauthSwift has support for ASWebAuthenticationSession and this should be the default way to initialize a OAuth2/OIDC Login.

Can this somehow be made configurable @moberwasserlechner ?

phal0r avatar Oct 20 '21 15:10 phal0r

Hey there. This is quite important because we already had some trouble with Apple App Review. Sometimes they reject our app because we do not use the desired way of ASWebAuthenticationSession. When ASWebAuthenticationSession is used there is an alert asking the user if the app should open a authentication-session (see screenshot as example). We would really appreciate this feature as it is implemented in the underlying plugin already. 33736712-3d3deaf4-db59-11e7-9336-552df2fc092d

doublechecker avatar Mar 17 '22 12:03 doublechecker

moreover, this feature would allow to achieve Single Sign On between two or more different apps (provided they all talk to the same OIDC provider)

LucaBlackDragon avatar Nov 18 '22 15:11 LucaBlackDragon

I've created a pull request that allows the plugin to support ASWebAuthenticationSession. Here is it: #226

sampaxk avatar Jan 17 '23 09:01 sampaxk