This commit is contained in:
Hillel Coren 2020-02-25 13:53:01 +02:00
parent ddac000655
commit 17d6ca6b48
1 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
import 'dart:html' as html5;
import 'dart:async';
import 'dart:convert';
import 'dart:core';
import 'dart:html' as html;
import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:invoiceninja_flutter/redux/static/static_state.dart';
@ -25,9 +25,9 @@ class PersistenceRepository {
state.rebuild((b) => b..userCompany.token.token = '');
if (kIsWeb) {
print('## COOKIE: ${html5.window.document.cookie}');
html5.window.document.cookie =
'token=$token; expires=Thu, 18 Dec 2099 12:00:00 UTC; Secure';
print('## COOKIE: ${html.window.document.cookie}');
html.window.document.cookie =
'token=$token; expires=Sat, 19 Dec 2099 12:00:00 UTC; Secure; SameSite=Strict;';
}
// TODO persist stateWithoutToken