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

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

Open
dryajov opened this issue Dec 26, 2016 · 5 comments
Open

Comments

@dryajov
Copy link

dryajov commented Dec 26, 2016

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.

@sergibondarenko
Copy link

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

@dryajov
Copy link
Author

dryajov commented Dec 28, 2016

@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.

@sergibondarenko
Copy link

sergibondarenko commented Dec 29, 2016

@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

@dryajov
Copy link
Author

dryajov commented Dec 29, 2016

@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.

@ldiqual
Copy link

ldiqual commented May 9, 2017

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
Labels
None yet
Development

No branches or pull requests

3 participants