Mfa bugs (#38)

This commit is contained in:
Olav Sundfør 2024-09-23 17:44:16 +02:00 committed by GitHub
parent 4912829440
commit d3a4c4a585
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 22 additions and 2 deletions

View File

@ -30,7 +30,12 @@ export const DonationSection = function () {
</p>
<div className="justify-center my-8">
<form className={"flex flex-col mx-4"}>
<form
className={"flex flex-col mx-4"}
onSubmit={(e) => {
e.preventDefault();
}}
>
<Input
type={"email"}
placeholder={"din@epost.no"}

View File

@ -1,5 +1,6 @@
// deno-lint-ignore-file ban-ts-comment
import "jsr:@std/dotenv/load";
import { encodeHex } from "jsr:@std/encoding/hex";
import { getHostUrl } from "../utils.ts";
import { STATUS_CODE } from "$fresh/server.ts";
@ -50,7 +51,8 @@ export const createAgreement = async function (email: string) {
// @ts-ignore
headers: {
authorization: `Bearer ${token}`,
"Idempotency-Key": `${email}-${Date.now()}`,
// anonymized and trimmed to not be too long (then it fails)
"Idempotency-Key": `${encodeHex(email).slice(0, 10)}-${Date.now()}`,
...standardVippsHeaders,
},
body: JSON.stringify({

13
todo.md Normal file
View File

@ -0,0 +1,13 @@
# Bugs
- [ ] enter on sponsor input reloads the page
- [x] reproduce
- [x] fix
- [ ] report back to user (MFA email)
- [ ] user (MFA email) gets an error with one of his emails (see mail thread)
- [x] reproduce
- [x] fix
- [ ] report back to user
- [ ] there are more users registered as paying users than there are payments received
- [ ] are these people supposed to still be subscribers?
- [ ] how can this have happenned?