Skip to content

Commit

Permalink
Add missing field to UsernameInfoPayload
Browse files Browse the repository at this point in the history
  • Loading branch information
swansontec committed Oct 2, 2023
1 parent 7262003 commit 6f688f2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/core/fake/fake-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,10 @@ const loginRoute = withLogin2(
if (login == null) {
return statusResponse(statusCodes.noAccount)
}
const { passwordAuthSnrp = userIdSnrp } = login
return payloadResponse(wasUsernameInfoPayload({ passwordAuthSnrp }))
const { loginId, passwordAuthSnrp = userIdSnrp } = login
return payloadResponse(
wasUsernameInfoPayload({ loginId, passwordAuthSnrp })
)
}
if (recovery2Id != null && recovery2Auth == null) {
const login = db.getLoginByRecovery2Id(recovery2Id)
Expand Down
4 changes: 3 additions & 1 deletion src/types/server-cleaners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export const asLoginResponseBody: Cleaner<LoginResponseBody> = asObject({
// The response payload:
results: asOptional(asUnknown),

// What of response is this (success or failure)?:
// What type of response is this (success or failure)?:
status_code: asNumber,
message: asString
})
Expand Down Expand Up @@ -353,6 +353,8 @@ export const asRecovery2InfoPayload: Cleaner<Recovery2InfoPayload> = asObject({
})

export const asUsernameInfoPayload: Cleaner<UsernameInfoPayload> = asObject({
loginId: asBase64,

// Password login:
passwordAuthSnrp: asOptional(asEdgeSnrp),

Expand Down
2 changes: 2 additions & 0 deletions src/types/server-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ export interface Recovery2InfoPayload {
* Returned when fetching the password hashing options for an account.
*/
export interface UsernameInfoPayload {
loginId: Uint8Array

// Password login:
passwordAuthSnrp?: EdgeSnrp

Expand Down

0 comments on commit 6f688f2

Please sign in to comment.