-
Hi, I would like to know better how caching works. Actually, I'm storing user credentials on device keychain and when app is opened, I re-authenticate using keychain, if it does not work, the app re-ask user for credentials. But I would to know if I can do better using Also note, my app is based on Thanks 👍 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @vlourme, There's no refresh Once you're authenticated with You should totally check the Followers example though and see how |
Beta Was this translation helpful? Give feedback.
Hey @vlourme,
There's no refresh
access_token
, there's actually noaccess_token
at all: the Instagram Private API works differently than regular APIs.If you check the example you'll see the user is always ever prompted to log in the first time: once it's done, and the
Secret
stored onKeychainStorage
, it's gonna retrieve thatSecret
and never even prompt the login again. You only ever need to log back in if endpoints fail and they require you to authenticate the user again.You should not store the user's credentials.
Once you're authenticated with
BasicAuthenticator
, next time just callKeychainStroage<Secret>().all().first
and get the first storedSecret
and use it directly (or store t…