redux1997
05/08/2023, 12:52 PMredux1997
05/08/2023, 12:55 PMredux1997
05/08/2023, 12:59 PMAlHill
05/08/2023, 3:50 PMAlHill
05/08/2023, 3:51 PMdave
05/08/2023, 4:20 PMdave
05/08/2023, 4:41 PMErisa | Support Engineer
05/08/2023, 4:48 PMdave
05/08/2023, 5:06 PMkian
05/08/2023, 5:21 PMkian
05/08/2023, 5:21 PMdave
05/08/2023, 6:00 PMJeff Wu | Notional
05/08/2023, 6:22 PMRESPONSE: {
"result": null,
"success": false,
"errors": [
{
"code": 10021,
"message": "Error: Script startup exceeded CPU time limit.\n"
}
],
"messages": []
}
Jeff Wu | Notional
05/08/2023, 6:23 PMJeff Wu | Notional
05/08/2023, 6:24 PMJeff Wu | Notional
05/08/2023, 6:24 PMJeff Wu | Notional
05/08/2023, 6:25 PMsathoro
05/08/2023, 7:19 PMJeff Wu | Notional
05/08/2023, 7:24 PMawait import(...)
inside a function, maybe that will help someone elsedave
05/08/2023, 7:37 PMsathoro
05/08/2023, 7:38 PMdave
05/08/2023, 7:40 PMsathoro@testing.email.ai.moda
as your AWS access ID, and randomvaluethatweprovidedyouawhileago
as your AWS secret key. If an attacker gives sathoro@testing.email.ai.moda
but with an invalid AWS secret key, they would still know that you're a customer of ours.sathoro
05/08/2023, 7:41 PMdave
05/08/2023, 7:42 PMsathoro
05/08/2023, 7:42 PMsathoro@testing.email.ai.moda
?dave
05/08/2023, 7:42 PMdave
05/08/2023, 7:43 PMdave
05/08/2023, 7:44 PMtypescript
export const registerEndpoint: Handler<
AuthApiContext,
string,
{ out: { json: SendOtpType } }
> = (c) => {
const { email: input_email } = c.req.valid('json');
const decoded_email = decodeURIComponent(input_email);
console.debug(`decoded_email: ${decoded_email}`);
if(!validateEmail(decoded_email)) {
return c.json({ success: false, message: 'Invalid email' });
}
const created_prom = getBillingId(decoded_email).then(async (billing_id) => {
const supabase_client_admin = c.get('supabase_client_admin')
return supabase_client_admin.auth.admin.createUser({
email: decoded_email,
user_metadata: {
billing_id: billing_id
}
})
})
c.executionCtx.waitUntil(created_prom);
created_prom.then((res) => {
console.debug(`res: ${JSON.stringify(res)}`);
}).catch((err) => {
console.error(`err: ${JSON.stringify(err)}`);
})
return c.json({ success: true, message: 'Email has been registered.' }, 202);
}
dave
05/08/2023, 7:44 PM