private void LoadPersistedTokens() { m_Client = new IdentityClient(settings.APIBaseUrl, settings.IDDomainID); if (persistentService != null) { m_State.anonymousToken = persistentService.ReadValue(settings.AnonymousTokenPersistKey); m_State.refreshToken = persistentService.ReadValue(settings.RefreshTokenPersistKey); } }
// Start initializes the UAS backend public override void Start() { settings = UnityUserAuthLoader.GetSettings(); m_IdDomainId = settings.IDDomainID; m_Client = new IdentityClient(settings.APIBaseUrl, settings.IDDomainID); if (persistentService != null) { if (settings.PersistRefreshToken) { m_State.anonymousToken = persistentService.ReadValue(settings.AnonymousTokenPersistKey); m_State.refreshToken = persistentService.ReadValue(settings.RefreshTokenPersistKey); } else { persistentService.DeleteKey(settings.AnonymousTokenPersistKey); persistentService.DeleteKey(settings.RefreshTokenPersistKey); m_State.anonymousToken = ""; m_State.refreshToken = ""; } } m_Running = true; }