-
Notifications
You must be signed in to change notification settings - Fork 195
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
signInWithWebUI.resultPublisher not firing on successful auth using authorization code flow with Universal Link redirect #1006
Comments
Hi @blau2, the documentation provides the example with registering a custom URL schema when you provision Cognito User Pool's Callback URLs and the Sign out URLs. Given this set up on the Cognito settings as "myapp://" and sample app with the updated CFBundleURLSchemes to have
Can you clarify what happens when you call signInWithWebUI, successfully authenticate with the provider, and then
If it is the first case, you can step through this logic to see if processURL was successful, which should eventually propagate the success or failure result back to the signInWithWebUI callback. If it is the second case, this sounds like the flow of the App broken since signInWithWebUI launches a webview, which then redirects to your Universal Link, which then launches the App again. Could you also expand on why you want the sign in redirect to be a Universal Link? |
Hi @lawmicha, after successfully authenticating with the identity provider, SFAuthenticationSession redirects to our Universal Link which triggers the We are using Universal Links for our redirect for a couple of reasons:
For what it's worth, I've since moved on from Amplify and am using the AppAuth SDK for our OAuth needs. |
Thanks for getting back to us. It sounds like |
This issue is stale because it has been open for 14 days with no activity. Please, provide an update or it will be automatically closed in 7 days. |
@blau2 Since the release of Amplify V2, we have moved to using I will close this issue as this seems to be fixed and no action is required on our part. If you still don't see it working, please reopen the issue with more details and I will be happy to investigate this further. Thanks for your patience. |
|
Describe the bug
We have Cognito configured to use the authorization code grant flow. From our iOS application, we initiate the auth flow using the hosted UI by calling
Amplify.auth.signInWithWebUI.resultPublisher
. Our redirect URL is a Universal Link which, upon successful authentication, deeplinks back into our iOS application with the authorization code in the query string, as expected. No event is emitted on the original subscription, however, and subsequent calls toAmplify.Auth.fetchAuthSession
indicate that the user is not signed in. Is there a method that needs to be called on the deeplink callback to register the authorization code with Amplify? Or should this happen automatically under the hood?To Reproduce
Steps to reproduce the behavior:
Expected behavior
signInWithWebUI.resultPublisher
emits value, indicating that the user is authenticated.Screenshots
If applicable, add screenshots to help explain your problem.
Environment(please complete the following information):
Device Information (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: