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

AWSCognitoAuth signIn error #857

Closed
serddmit opened this issue Mar 23, 2018 · 5 comments
Closed

AWSCognitoAuth signIn error #857

serddmit opened this issue Mar 23, 2018 · 5 comments

Comments

@serddmit
Copy link

To help us solve your problem better, please answer the following list of questions.

  • What service are you using?
    AWSCognitoAuth

  • In what version of SDK are you facing the problem?
    SDK 11.2

  • Is the issue limited to Simulators / Actual Devices?
    NO

  • Can your problem be resolved if you bump to a higher version of SDK?
    NO

  • Is this problem related to specific iOS version?
    NO

  • How are you consuming the SDK? CocoaPods / Carthage / Prebuilt frameworks?
    Cocoapods

  • Can you give us steps to reproduce with a minimal, complete, and verifiable example? Please include any specific network conditions that might be required to reproduce the problem.

SignIn with Google provider. SignOut. Sign in with Google provide -> Error occurs.

When I had authorized previously and made sign out after, my next sign In will display "Loading page failed". This happens every second login-logout pair.

This happens only for Google provider.
The error is generated in - (void)safariViewController:(SFSafariViewController *)controller didCompleteInitialLoad:(BOOL)didLoadSuccessfully with didLoadSuccessfully = NO.

So this will generate error and not wait for NSURLSession callback.

Does anyone has such problem?Thanks

@kainoffke
Copy link

I can confirm this issue. I am currently facing the same problems. As a workaround I created an extension for AWSCognitoAuth like so:

extension AWSCognitoAuth : SFSafariViewControllerDelegate {
   public func safariViewController(_ controller: SFSafariViewController, didCompleteInitialLoad didLoadSuccessfully: Bool) {
        // I was just implemented do stop AWSCognitoAuth calling its own delegate implementation.
    }
}

The problem seems to be, that the redirects in the SafariViewController are happening too fast for it to actually load the page initially.

@serddmit
Copy link
Author

serddmit commented Mar 28, 2018

I end up by removing this method at all:
public func safariViewController(_ controller: SFSafariViewController, didCompleteInitialLoad didLoadSuccessfully: Bool) {}
This will not impact functionality, but leave user to make done/cancel by itself.

@stale
Copy link

stale bot commented Apr 28, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix-stale label Apr 28, 2018
@stale
Copy link

stale bot commented May 5, 2018

This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems.

@dluquedavid
Copy link

problem only happen when yo set "identity_provider=google", the redirect fail.
We fixed it with @kainoffke solution.

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

No branches or pull requests

4 participants