Open lolucosmin opened 5 months ago
launchCustomTabs
is a private method so can you share with us the public method you're calling? It would also be beneficial to see a code snippet of that too. Have you tried adding some breakpoints to see the code path?
@vincetran Hi, the main idea is we are using AWSMobileClient sdk, so we are calling AWSMobileClient.getInstance().showSignIn(activity, signInUIOptions, new Callback
@vincetran more details about that, i work with @lolucosmin :
but while webview is working to redirect to scheme://signin, the webview load another time the login url
we added breakpoint to understand what is happening and we saw that startActivityForResult is called two times since akamai use crsf token in their url, it makes an error with aws ios sdk, we dont have this issue
Thanks for the response @lolucosmin and @mhugot. As I investigate a little further, just wanted to first inquire if you're integrating auth using aws-sdk-android for the first time in your app. I ask because we suggest new integrations to use Amplify Android instead.
Also, can you clarify this statement:
since akamai use crsf token in their url, it makes an error
What kind of error? (The exact stacktrace would be helpful)
Hello, It's a white label app used by many customer, so we are working on migration, but extra steps are required before we can migrate to Amplify. For the error : basically we are calling the authorize url, then it redirect to a unique url with a token. If this url with token is called multiple times, it throw a 403 error.
hello @vincetran @phantumcode i see you added bug label, have you reproduced the issue? when do you think you can fix that? thanks
@mhugot Would it be possible to step back even further during debugging and see what is triggering launchCustomTabs
2 times in your use case.
For example, launchCustomTabs
is only called within AuthClient launchCognitoAuth
and launchSignOut
. I assume signOut is not relevant here, so we can then look at launchCognitoAuth
usages.
launchCognitoAuth
is called within AuthClient getSession
and refreshSession
. Can you set a breakpoint on these methods and to see how launchCustomTabs
is eventually called twice?
Thank you!
State your question Why in AuthClient when we call launchCustomTabs the line 473 is called twice ( activity.startActivityForResult(CustomTabsManagerActivity.createStartIntent(this.context, this.mCustomTabsIntent.intent), 49281)), but only this line. The function is called 1 time. Because is called twice the webpage is failing to load the correct sign in session.
Which AWS Services are you utilizing? cognitoauth: version 2.75.2.
Provide code snippets (if applicable)
Environment(please complete the following information):
Device Information (please complete the following information):
If you need help with understanding how to implement something in particular then we suggest that you first look into our developer guide. You can also simplify your process of creating an application, as well as the associated backend setup by using the Amplify CLI.