mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
Reset password through setup wizard (#1490)
* closes FE portion of #1470 * remove accidental commit of local script * add reset password option (#1560) * fix error code for incorrect password and clarify codes with comments Co-authored-by: Matt Hill <matthill@Matt-M1.local> Co-authored-by: Lucy Cifferello <12953208+elvece@users.noreply.github.com> Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com>
This commit is contained in:
@@ -50,7 +50,8 @@ export class LoginPage {
|
||||
.setVerified()
|
||||
.then(() => this.router.navigate([''], { replaceUrl: true }))
|
||||
} catch (e: any) {
|
||||
this.error = e.code === 34 ? 'Invalid Password' : e.message
|
||||
// code 7 is for incorrect password
|
||||
this.error = e.code === 7 ? 'Invalid Password' : e.message
|
||||
} finally {
|
||||
this.loader.dismiss()
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ export class HttpService {
|
||||
|
||||
const res = await this.httpRequest<RPCResponse<T>>(httpOpts)
|
||||
if (isRpcError(res)) {
|
||||
// code 34 is authorization error ie. invalid session
|
||||
if (res.error.code === 34) this.auth.setUnverified()
|
||||
throw new RpcError(res.error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user