mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-13 21:40:45 +01:00
ログアウトの処理と外部サービス連携Viewがセッションクッキーを作らないように (#4856)
This commit is contained in:
parent
c6249b82d4
commit
58a04ce1a5
2 changed files with 6 additions and 2 deletions
|
@ -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 a new issue