File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,9 +47,7 @@ export default {
4747 };
4848 },
4949 mounted () {
50- // TODO: Maybe there is a better way to do this?
51- const urlParams = new URLSearchParams (window .location .search );
52- const session = urlParams .get (" session" );
50+ const session = this .$route .query .session ;
5351 if (session) {
5452 this .setPreference (" authToken" + this .hashCode (this .authApiUrl ()), session);
5553 this .$router .push (" /" );
Original file line number Diff line number Diff line change @@ -473,6 +473,7 @@ export default {
473473 document .title = this .$t (" titles.preferences" ) + " - Piped" ;
474474 },
475475 async mounted () {
476+ if (this .$route .query .deleted == this .getAuthToken ()) this .logout ();
476477 if (Object .keys (this .$route .query ).length > 0 ) this .$router .replace ({ query: {} });
477478
478479 this .fetchJson (" https://piped-instances.kavin.rocks/" ).then (resp => {
@@ -611,7 +612,8 @@ export default {
611612 }),
612613 }).then (resp => {
613614 if (! resp .error ) {
614- this .logout ();
615+ const redirect = resp .redirect ;
616+ redirect ? (location .href = redirect) : this .logout ();
615617 } else alert (resp .error );
616618 });
617619 },
You can’t perform that action at this time.
0 commit comments