Questions tagged [sfauthenticationsession]

30 questions
64
votes
6 answers

SFAuthenticationSession/ASWebAuthenticationSession and logging out

I'm planning to switch an app from the old OAuth flow with the SFSafariViewController to the new flow with iOS 11's SFAuthenticationSession. Logging in isn't an issue, the transfer to the new API took me a few minutes to implement. However logging…
JanMensch
  • 1,720
  • 1
  • 18
  • 27
12
votes
1 answer

Is there a way to know if there is a cookie available before showing the SFAuthenticationSession prompt

On iOS 11, Apple introduced a new way to share auth data between the web and a Mobile App with SFAuthenticationSession. It would be a bad user experience to show the SFAuthenticationSession prompt to every new users - that might have never used my…
Ludovic Landry
  • 11,606
  • 10
  • 48
  • 80
7
votes
1 answer

Clearing an SFAuthenticationSession alert in an XCUITest with addUIInterruptionMonitor()

Has anybody successfully used addUIInterruptionMonitor to clear the alert produced by start()ing an SFAuthenticationSession while running an XCUITest? I can't get it to work on Xcode 9.1/iOS 11.1.1 (simulator or device). The standard advice (setting…
Robert Atkins
  • 23,528
  • 15
  • 68
  • 97
6
votes
1 answer

Why does SFAuthenticationSession consent alert show Xcode project name instead of App name?

I'm using SFAuthenticationSession to authenticate via OAuth2. The consent the user has to agree displays the following message as an alert: "[Xcode-Project-Name]" Wants to Use "[Server-URL]" to Sign In. This allows the app and website to share…
heyfrank
  • 5,291
  • 3
  • 32
  • 46
5
votes
0 answers

ASWebAuthenticationSession only shows Cancel button

I am authenticating our web service using ASWebAuthenticationSession and for some reason the only option after the final redirect is Cancel. I had this working before where even if I did press Cancel, the callback Url was sent through the completion…
5
votes
0 answers

SFAuthenticationSession completion handler not called

I am trying to implement an approach to exchange cookies from Safari and App. I am using SFAuthenticationSession since the cookies sharing was disabled. I read through the topic and it seems this is the best solution to achieve this. There are not…
CRoig
  • 691
  • 5
  • 24
4
votes
0 answers

ASWebAuthentication and SFAuthentication login problem after logout on iOS 11 and iOS 12, not able to invalidate session

I am using ASWebAuthentication and SFAuthenticationto authenticate on a OAuth2 server with grant_type : authorization_code. Everything work perfect except of: user login successfully Logout by revoking access token and refresh token with status…
4
votes
1 answer

Using SFSafariViewController instead of ASWebAuthenticationSession/SFAuthenticationSession for OAuth

Our user experience team does not like the consent popup every time login page is opened. Also, we are looking to customize the look of the browser window presented when OAuth is implemented using…
3
votes
0 answers

SFAuthenticationSession, ASWebAuthenticationSession universal links redirect urls

I still don't quite get it. As far as I understand it we should do https redirects instead of using custom url schemes because everyone could define the custom schemes into their apps. Why are then Apple's solutions SFAuthenticationSession(used…
3
votes
0 answers

Showing Recent Messages Undefined symbol: _OBJC_CLASS_$_SFAuthenticationSession

I've just updated to macOS Catalina and on xCode to test an app I was building for iOS on how it'll look like on mac I checked Mac under Development Info. When I run it on an iOS device it runs successfully. But when I run it using My Mac as target…
Chaudhry Talha
  • 7,231
  • 11
  • 67
  • 116
3
votes
3 answers

How does SFAuthenticationSession store session related cookies in Safari

tl;dr read the last paragraph. I am using AppAuth (https://github.com/openid/AppAuth-iOS) library for handling OpenID based authentication of users for which I want to provide SSO experience through my app. The deployment target of my app is iOS 11…
Au Ris
  • 4,541
  • 2
  • 26
  • 53
3
votes
0 answers

iOS 11 AppAuth handling redirect URI that redirects

When using AppAuth (v 0.90.0) for Google OAuth authentication on my iOS app, specifically for iOS 11, the following happens: Start Google authentication on the iOS client with a redirect URI http://myproduct.com/oauth-redirect. Because the client…
Grnbeagle
  • 1,751
  • 2
  • 16
  • 26
3
votes
1 answer

Why does SFAuthenticationSession prompt for consent every time?

I'm using SFAuthenticationSession with SSO and OAuth. When calling the start() method, iOS pops up a consent dialog asking the user to allow the app to use the OAuth provider. The consent popup appears every time the authentication session is…
MDRoz
  • 456
  • 2
  • 9
  • 17
3
votes
1 answer

Create SSO using SFAuthenticationSession in iOS 11

I'm working on two iOS applications that share the same keychain tokens which they receive when the user logs-in in either of the apps by entering his username and password in a web view. The tokens saved saved in the keychain, are time limited for…
2
votes
1 answer

Logging in SFAuthenticationSession then opening a link in SFSafariViewController that does SSO

I'm using AppAuth-iOS for my AD B2C login, AppAuth-iOS uses SFAuthenticationSession for making authentication requests on iOS 11+. I assumed that when I call SFSafariViewController to open a link to a webapp that does SSO with the B2C, it will…
1
2