mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 12:13:48 +01:00
ログアウトの処理と外部サービス連携Viewがセッションクッキーを作らないように (#4856)
This commit is contained in:
parent
212dfe0a0c
commit
094023ddee
@ -54,7 +54,11 @@ export default Vue.extend({
|
||||
},
|
||||
|
||||
mounted() {
|
||||
document.cookie = `i=${this.$store.state.i.token}`;
|
||||
if (!document.cookie.match(/i=(\w+)/)) {
|
||||
document.cookie = `i=${this.$store.state.i.token}; path=/;` +
|
||||
` domain=${document.location.hostname}; max-age=31536000;` +
|
||||
(document.location.protocol.startsWith('https') ? ' secure' : '');
|
||||
}
|
||||
this.$watch('$store.state.i', () => {
|
||||
if (this.$store.state.i.twitter) {
|
||||
if (this.twitterForm) this.twitterForm.close();
|
||||
|
@ -126,7 +126,7 @@ export default (os: MiOS) => new Vuex.Store({
|
||||
|
||||
logout(ctx) {
|
||||
ctx.commit('updateI', null);
|
||||
document.cookie = 'i=;';
|
||||
document.cookie = `i=; max-age=0; domain=${document.location.hostname}`;
|
||||
localStorage.removeItem('i');
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user