Skip to content

broken soundcloud auth flow - window doesn't close after authenticated #76

Open

Description

@dryajov

After authenticating with soundcloud with the popup flow, the popup never closes and just sits there with This popup should automatically close in a few seconds message. I see the following stacktrace in the console:

Uncaught TypeError: Cannot read property 'search' of undefined
    at Object.notifyDialog (/scripts/main.js:97393)
    at Object.connectCallback (/scripts/main.js:97386)
    at soundcloud_auth.html:9
notifyDialog @ /scripts/main.js:97393
connectCallback @ /scripts/main.js:97386
(anonymous) @ soundcloud_auth.html:9

I can consistently reproduce this issue on:

  • Safari: Version 10.0.1 (12602.2.14.0.7)
  • Chrome: Version 55.0.2883.95 (64-bit)
  • Firefox: Version 50.1.0

PR: #47 fixes this issue.

Activity

  1. sergibondarenko commented on Dec 28, 2016

    @sergibondarenko

    @dryajov I have broken authentication flow too. Please look the issue #77, do you think it is related to your issue?

  2. dryajov commented on Dec 28, 2016

    @dryajov
    Author

    @SergeyBondarenko that sounds more like a CORS issue, can you make sure that the redirect url (might be called differently in SC) in your soundcloud account is set to the exact host you're authenticating from? Protocol, host name and port should all match.

  3. sergibondarenko commented on Dec 29, 2016

    @sergibondarenko

    @dryajov yes, I checked it already, the redirect URI in my code is the same as the registered one and I'm trying to sign-in from the same http://domain.com

  4. dryajov commented on Dec 29, 2016

    @dryajov
    Author

    @SergeyBondarenko That is weird, but still seem to be a different issues, just from the call stack you provided.

    Is that over http or https? There might also be a restriction with iframes cross-domain insecure http calls in some browsers, I know that chrome has been cracking down on http lately, might be worth trying it in other browsers and/or looking at iframe restrictions in general.

  5. ldiqual commented on May 9, 2017

    @ldiqual

    Fyi, this is how I fixed it:

    window.opener.SC.location = window.location
    window.opener.SC.connectCallback()
    delete window.opener.SC.location
    

    However #47 seems to have a proper fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions