Skip to content

Commit e82d39b

Browse files
Merge branch 'master' of github.com:deriv-com/deriv-app
2 parents 68533e5 + 9eddb5f commit e82d39b

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

packages/core/build/config.js

+5
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ const copyConfig = base => {
115115
to: 'localstorage-sync.html',
116116
toType: 'file',
117117
},
118+
{
119+
from: path.resolve(__dirname, '../src/root_files/front-channel.html'),
120+
to: 'front-channel.html',
121+
toType: 'file',
122+
},
118123
{ from: path.resolve(__dirname, '../src/root_files/robots.txt'), to: 'robots.txt', toType: 'file' },
119124
{ from: path.resolve(__dirname, '../src/root_files/sitemap.xml'), to: 'sitemap.xml', toType: 'file' },
120125
{
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<title>Deriv</title>
5+
<meta charset="utf-8" />
6+
<script>
7+
try {
8+
// we check if we can access the top.location, if we can't it will throw an error
9+
// and this means this front-channel is not rendered on the same window as the application which is logging out
10+
let isSameOrigin = top.location.hostname === self.location.hostname;
11+
} catch (err) {
12+
localStorage.removeItem('closed_toast_notifications');
13+
localStorage.removeItem('is_wallet_migration_modal_closed');
14+
localStorage.removeItem('active_wallet_loginid');
15+
localStorage.removeItem('config.account1');
16+
localStorage.removeItem('config.tokens');
17+
localStorage.removeItem('client.accounts');
18+
localStorage.removeItem('verification_code.system_email_change');
19+
localStorage.removeItem('verification_code.request_email');
20+
localStorage.removeItem('new_email.system_email_change');
21+
}
22+
</script>
23+
</head>
24+
25+
<body></body>
26+
</html>

0 commit comments

Comments
 (0)