-
Notifications
You must be signed in to change notification settings - Fork 3
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
rdioDidAuthorizeUser not being invoked after a [rdio authorizeUsingAccessToken:AFOAuthCredential] call #161
Comments
As a follow up, I have been debugging this for a few days now and I think what is happening is that the refresh_token in the saved AFOAuthCredential gets set to null. Then after that, subsequent calls to the Rdio API fails after that and I can't renew the OAuth2 session because I don't have the refresh_token anymore. Any ideas? |
I was able to get around this by doing what @ungureanuli did with his OAuth2 issue. I renew the tokens separately outside of the SDK, then create the AFOAuthCredential object using those tokens. An interesting observation here is that if I save the AFOAuthCredential object itself (since the object implements NSSecureEncoding), the refresh token seems to be set to null at some point by some process that I am not aware of. However, if I create the AFOAuthCredential object manually with the saved tokens I am able to refresh the tokens. |
I keep getting this error now: The rdioDidAuthorizeUser method never gets called again, until I manually login again. Is anyone from Rdio looking at this? Can I please get a response or confirmation if this is a bug? Thanks! |
Yep. I've been experiencing this same issue, too. Steps to Reproduce
Things I’ve TriedI’ve tried calling
Further, quitting and relaunching the app and trying the above steps again leads to repeat occurrences of that console log. It's as if the Rdio SDK has cached the previous login state to disk and refuses to accept further requests, even though after a force quit there are no inflight authentication requests. At this point my only recourse is to force the user to log out and then sign back in again. WorkaroundsThere is only one workaround. Since I can't try to force a repeat authorization without forcing the user to sign out, I have to force the app to This is a show-stopper bug for me. I may have to scrap my whole project because of this issue. :-( |
Update: Shit. I think I may have identified a possible bug on my side leading to this. I'm not sure yet, but I'll follow up in a couple days when I have more info. |
(Yay, 12 hour wait times btwn bugs). |
Update: Alas, the bug I identified in my code did not affect this issue. So, yes, this is a show-stopping bug that if unfixed will mean I have to scrap my entire project. :-/ |
I have even tried anticipating the expired credential, refreshing it, and then using the refreshed credential to authenticate the user. This leads to the same behavior as trying with an expired credential. The first call to authenticate the existing user with a credential (expired or not) never leads to a delegate method callback. Neither the success nor the failure callback is called. |
Any word on this? |
I have done the same thing and still experience the issue. I haven't heard back from anyone at Rdio sadly. If any of the devs is looking at this, please give us any alternate suggestions or a fix as this is a show stopper for me as well. |
I've been able to reproduce this issue and I'm now investigating a fix. No ETA yet |
Any word on this with an ETC? Thx. |
This is fixed as of v3.1.0 |
Woo-hoo! I look forward to trying this out. |
Will the fix apply retroactively to existing credentials created using |
BTW: I also opened a PR: rdio/hello-ios-playback#14 to enable Swift import support. |
I am testing as well. Will post back if it fixes it for me. Thanks a lot for following up on this @dasevilla. Appreciate it! |
Unfortunately the issue is still happening for me using 3.1.0. |
Hello jaredsinclair. A possible workaround for your problem is to try, before calling the authorizeUsingAccessToken: method, something like: |
Hello yourei. A possible workaround may be to logout and destroy the RdioObject, delegates, RdioPlayer... and start again the login flow (also have in mind the above suggestion when you start the login flow). |
Hi - I updated my framework to the latest and switched over to OAuth 2.0. Everything seems fine when I login fresh and try to get playlists using the rdio authorizeUsingAccessToken method. But, after an hour or so it just stops working and when I try to invoke the authorizeUsingAccessToken by passing in the saved AFOAuthCredential, it never goes to the delegate methods of didAuthorize or didFailed. Sometimes, I get a rather unusual error saying that it is an invalid_grant and the User ID is removed from the account store. But, the same code and setup works when I login fresh and use the saved credential for an hour.
I essentially do a rdio authorizeUsingAccessToken and then make the rdioRequest using callAPIMethod in the rdioDidAuthorizeUser method with a success/failure block.
Please let me know if there are any issues on the server side at this moment?
Appreciate your help!
The text was updated successfully, but these errors were encountered: