mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 20:23:49 +01:00
Clean up auth.vue
This commit is contained in:
parent
07d45c6a70
commit
36566d3dfe
@ -89,9 +89,7 @@ export default defineComponent({
|
||||
const isMastodon = !!getUrlParams().mastodon
|
||||
if (this.session.app.callbackUrl && isMastodon) {
|
||||
const stateParam = !!getUrlParams().state ? `&state=$(getUrlParams().state)` : '';
|
||||
const tokenRaw = this.session.token
|
||||
const token = tokenRaw.replaceAll('-', '')
|
||||
location.href = `${this.session.app.callbackUrl}?code=${tokenRaw}${stateParam}`;
|
||||
location.href = `${this.session.app.callbackUrl}?code=${this.session.token}${stateParam}`;
|
||||
} else if (this.session.app.callbackUrl) {
|
||||
const url = new URL(this.session.app.callbackUrl);
|
||||
if (['javascript:', 'file:', 'data:', 'mailto:', 'tel:'].includes(url.protocol)) throw new Error('invalid url');
|
||||
|
Loading…
Reference in New Issue
Block a user