AndroidArchitecture
AndroidArchitecture copied to clipboard
How to get Access token (TokenStore) to check if the user already login?
Hi @binaryroot , I use your boilerplate for my learning, I tried to check if the user already login to intent to MainActivity, but I don't know how to get the TokenStore from activity/fragment.
Do you mind if you share how to do it?
Thanks.
I use mTokenStore = TokenStore(SecurePreferences(application)). Is it OK? Or there is another way to get the securePreference, I've tried getAppComponent().sharedSecurePrefs(), but it always show empty when I get the TokenStore.userToken.