hanko icon indicating copy to clipboard operation
hanko copied to clipboard

fix: send 401 when passcode is not found instead of 404

Open like-a-bause opened this issue 2 years ago • 2 comments

closes #240

like-a-bause avatar Sep 19 '22 07:09 like-a-bause

The frontend reacts here: https://github.com/teamhanko/hanko/blob/5693c90077a2ea4e332f76a679afecab32d6aa81/frontend-sdk/src/lib/client/PasscodeClient.ts#L99 I don't see a big problem going forward with this.

like-a-bause avatar Sep 20 '22 06:09 like-a-bause

The frontend reacts here:

https://github.com/teamhanko/hanko/blob/5693c90077a2ea4e332f76a679afecab32d6aa81/frontend-sdk/src/lib/client/PasscodeClient.ts#L99

I don't see a big problem going forward with this.

If the handler no longer returns a 404, do we still need to explicitly check for it here:

https://github.com/teamhanko/hanko/blob/5693c90077a2ea4e332f76a679afecab32d6aa81/frontend-sdk/src/lib/client/PasscodeClient.ts#L101

?

lfleischmann avatar Sep 20 '22 11:09 lfleischmann

The frontend reacts here: https://github.com/teamhanko/hanko/blob/5693c90077a2ea4e332f76a679afecab32d6aa81/frontend-sdk/src/lib/client/PasscodeClient.ts#L99

I don't see a big problem going forward with this.

If the handler no longer returns a 404, do we still need to explicitly check for it here:

https://github.com/teamhanko/hanko/blob/5693c90077a2ea4e332f76a679afecab32d6aa81/frontend-sdk/src/lib/client/PasscodeClient.ts#L101

?

You are right, of course. Fixed.

like-a-bause avatar Sep 22 '22 06:09 like-a-bause