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
{{ message }}
This repository has been archived by the owner on May 10, 2024. It is now read-only.
Basically, when a person enables VPN by visiting account.brave.com the time-limited credentials v2 are used. Through the SKU SDK, the prepare_credentials_presentation is called and a credential is presented. We're already parsing this partly because we need to get the expiration date.
Besides storing expiration date, we should also store the credential until it gets redeemed (or it expires). If Guardian's API has a service outage when we are requesting subscriber credentials, I don't believe we are retrying. If we try to call prepare_credentials_presentation again, it'll report that the user is out of credentials and ultimately they have to wait until the next day
The text was updated successfully, but these errors were encountered:
One thought which might help keep implementation clean (kudos to @simonhong):
Just like how we cache the subscriber credentials, we also cache the SKU credential until it's redeemed. On Desktop/Android, the cached value being persisted to disk (which has subscriber credential) is a dictionary (base::Value::Dict).
After SKU SDK present is called (but BEFORE subscriber credentials issued), this has two values (expiration and skus_credential)
After subscriber credentials are redeemed, a new empty dictionary is created and only the new fields are written (expiration, credential)
Description:
This is the iOS version of brave/brave-browser#29345 - which fixed for Desktop/Android.
Basically, when a person enables VPN by visiting account.brave.com the time-limited credentials v2 are used. Through the SKU SDK, the
prepare_credentials_presentation
is called and a credential is presented. We're already parsing this partly because we need to get the expiration date.Besides storing expiration date, we should also store the credential until it gets redeemed (or it expires). If Guardian's API has a service outage when we are requesting subscriber credentials, I don't believe we are retrying. If we try to call
prepare_credentials_presentation
again, it'll report that the user is out of credentials and ultimately they have to wait until the next dayThe text was updated successfully, but these errors were encountered: