mirror of
https://github.com/TeamPiped/Piped.git
synced 2025-12-25 14:10:21 +00:00
Allow the usage of a different instance for authentication.
This commit is contained in:
@@ -154,8 +154,13 @@ const mixin = {
|
||||
apiUrl() {
|
||||
return this.getPreferenceString("instance", "https://pipedapi.kavin.rocks");
|
||||
},
|
||||
authApiUrl() {
|
||||
if (this.getPreferenceBoolean("authInstance", false)) {
|
||||
return this.getPreferenceString("auth_instance_url", this.apiUrl());
|
||||
} else return this.apiUrl();
|
||||
},
|
||||
getAuthToken() {
|
||||
return this.getPreferenceString("authToken" + this.hashCode(this.apiUrl()));
|
||||
return this.getPreferenceString("authToken" + this.hashCode(this.authApiUrl()));
|
||||
},
|
||||
hashCode(s) {
|
||||
return s.split("").reduce(function (a, b) {
|
||||
|
||||
Reference in New Issue
Block a user