Account: Refactor access token API and request forms #808 #4114

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2024-04-05 14:46:11 +02:00
parent 8208f80be5
commit fdc2062d33
92 changed files with 1659 additions and 1085 deletions

View File

@@ -379,10 +379,10 @@ export default class Session {
return LoginPage === window.location.href.substring(window.location.href.lastIndexOf("/") + 1);
}
login(username, password, passcode, token) {
login(username, password, code, token) {
this.reset();
return Api.post("session", { username, password, passcode, token }).then((resp) => {
return Api.post("session", { username, password, code, token }).then((resp) => {
const reload = this.config.getLanguage() !== resp.data?.config?.settings?.ui?.language;
this.setResp(resp);
this.onLogin();