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

isAuthenicated doesn't work on relaunch #6

Open
sirnacnud opened this issue Oct 31, 2014 · 0 comments
Open

isAuthenicated doesn't work on relaunch #6

sirnacnud opened this issue Oct 31, 2014 · 0 comments

Comments

@sirnacnud
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant