Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System safari is not redirecting back to native iOS app with url scheme #432

Closed
chintu-github opened this issue Aug 21, 2019 · 11 comments
Closed
Labels

Comments

@chintu-github
Copy link

Issue description:

I am building a native ios app using AppAuth library. In this flow, I am taking help of AppAuth to launch a webpage inside the app and authorize there. Once authorization is done, I need to do an email verification flow. So I am going outside of the app and launching system safari browser to log in my email id and click the verification link. Earlier that verification link had custom URI scheme but now it's removed as cookies have been made persistent. But after doing email verification it's not able to redirect back to the native ios app. I have added URL types in s info.plist of ios app. Earlier redirection was happening as URI scheme was present in verification link. But if I understand as persistent cookies are there it should able to handle redirection.

Need help from AppAuth team for this.

@julienbodet
Copy link
Collaborator

From what I understand you successfully implemented the authorization flow using AppAuth, is that right?

The "email verification flow" you mention seems to be beyond the scope of AppAuth and the authorization flow. Can you explain how is this related to AppAuth? Did you find a bug in AppAuth?

@chintu-github
Copy link
Author

This is not related to appauth issue but wanted to check with team whatever problem i am facing.
Yes, I implemented app auth flow correctly. there is no issue with that. As app auth is opening the webpage with SFAuthenticationsession so if backend has made persistent cookies for safari, then if I open any URL outside of my app that session should persist with system browser also right.

@julienbodet
Copy link
Collaborator

Session cookies set in ASWebAuthenticationSession (SFAuthenticationSession replacement for iOS12+) are not shared with the browser as per documentation.

@shravankumarbj
Copy link

I am facing same issue. When I checked the redirected webpage it is detecting the cookies left by the ASWeb/SFAuth session but its not providing the redirect URL from which app is launched. Not able to understand the problem as this works sometimes and fails sometimes..

@diptiy
Copy link

diptiy commented Aug 18, 2020

From what I understand you successfully implemented the authorization flow using AppAuth, is that right?

The "email verification flow" you mention seems to be beyond the scope of AppAuth and the authorization flow. Can you explain how is this related to AppAuth? Did you find a bug in AppAuth?

In my case, authentication flow is getting successful but when it comes to redirect back to app, redirect URL is continuing. I can't find any way to redirect back to app.

@punithbm
Copy link

The flow we're following here is

  • The user launches the app and asked to log in or register using Keycloak
  • User redirected to keycloak page where he tries to register
  • Email verification is mandatory to complete the registration. So the user will be asked to verify the email when he fills in the registration form.
  • User receives the verification email in his inbox. Opens in the safari inside the mobile device.
    Now when the verification is done user is not redirected inside the application. Instead, he is left in the safari browser only.
    Is there any way to handle this by redirecting the user inside the application. But a similar case in App Auth Android library works fine. Please check

@julienbodet

@punithbm
Copy link

@julienbodet Please let us know on this

@VinodComlink
Copy link

I am also having the exact same issue where the control did not get back in the app after successful openemr authentication.

Please suggest.

@StevenWatremez
Copy link

StevenWatremez commented Jun 14, 2023

Hi, I am facing the same issue too during the reset password flow. The user is not redirected to the iOS app and stay on the browser (safari for me). It works well on Android indeed but we don't understand how/why it works or not, depending on plateform. We try many things with deeplink but nothing work.

Have you any suggestions that we could try to manage this ?

@shravankumarbj
Copy link

shravankumarbj commented Jun 14, 2023 via email

@VinodComlink
Copy link

It was quite of long time but yes, It was myself and there is no such issue in our app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants