coinbase-ios-sdk icon indicating copy to clipboard operation
coinbase-ios-sdk copied to clipboard

isAuthenicated doesn't work on relaunch

Open sirnacnud opened this issue 10 years ago • 0 comments

The isAuthenicated method will only return true after you have called one of the login methods. If you login successfully, then close down the application and relaunch it, calling isAuthenicated will return false, even though the correct auth code, and tokens are stored in the user defaults.

I'm not for sure the best way to solve this problem. Should isAuthenicated, check the data stored in the user defaults, instead of a boolean? You then have the problem of what to do if the access token is expired.

For my own application, I added a hasAuthCode method that checks if an auth code is present. I can use this to determine whether I need the user to login in or not. The access token will then be automatically refreshed when I make any requests. I didn't push this up, as I'm not for sure if this is the best solution for the library.

sirnacnud avatar Oct 31 '14 06:10 sirnacnud