mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
Add oidc delete capability
This commit is contained in:
parent
0efeff0098
commit
f8fc281284
2 changed files with 4 additions and 4 deletions
|
|
@ -47,9 +47,7 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
//TODO: Maybe there is a better way to do this?
|
const session = this.$route.query.session;
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
|
||||||
const session = urlParams.get("session");
|
|
||||||
if (session) {
|
if (session) {
|
||||||
this.setPreference("authToken" + this.hashCode(this.authApiUrl()), session);
|
this.setPreference("authToken" + this.hashCode(this.authApiUrl()), session);
|
||||||
this.$router.push("/");
|
this.$router.push("/");
|
||||||
|
|
|
||||||
|
|
@ -473,6 +473,7 @@ export default {
|
||||||
document.title = this.$t("titles.preferences") + " - Piped";
|
document.title = this.$t("titles.preferences") + " - Piped";
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
|
if (this.$route.query.deleted == this.getAuthToken()) this.logout();
|
||||||
if (Object.keys(this.$route.query).length > 0) this.$router.replace({ query: {} });
|
if (Object.keys(this.$route.query).length > 0) this.$router.replace({ query: {} });
|
||||||
|
|
||||||
this.fetchJson("https://piped-instances.kavin.rocks/").then(resp => {
|
this.fetchJson("https://piped-instances.kavin.rocks/").then(resp => {
|
||||||
|
|
@ -611,7 +612,8 @@ export default {
|
||||||
}),
|
}),
|
||||||
}).then(resp => {
|
}).then(resp => {
|
||||||
if (!resp.error) {
|
if (!resp.error) {
|
||||||
this.logout();
|
const redirect = resp.redirect;
|
||||||
|
redirect ? (location.href = redirect) : this.logout();
|
||||||
} else alert(resp.error);
|
} else alert(resp.error);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue