You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: