objective categorical abstract machine language personal data server
65
fork

Configure Feed

Select the types of activity you want to include in your feed.

Generate shorter plc auth code

futurGH 2b196da3 01bfd6c2

+4 -1
+4 -1
pegasus/lib/api/identity/requestPlcOperationSignature.ml
··· 3 3 let did = Auth.get_authed_did_exn auth in 4 4 let code = 5 5 "plc-" 6 - ^ Uuidm.to_string (Uuidm.v4_gen (Random.State.make_self_init ()) ()) 6 + ^ String.sub 7 + Digestif.SHA256.( 8 + digest_string (did ^ Int.to_string @@ Util.now_ms ()) |> to_hex ) 9 + 0 8 7 10 in 8 11 let expires_at = Util.now_ms () + (60 * 60 * 1000) in 9 12 let%lwt () = Data_store.set_auth_code ~did ~code ~expires_at db in