MCPcopy Create free account
hub / github.com/dailydotdev/apps / onValidateRegistration

Function onValidateRegistration

packages/shared/src/hooks/useRegistration.ts:131–155  ·  view source on GitHub ↗
(
    values: RegistrationParameters & {
      turnstileToken?: string;
    },
  )

Source from the content-addressed store, hash-verified

129 });
130
131 const onValidateRegistration = async (
132 values: RegistrationParameters & {
133 turnstileToken?: string;
134 },
135 ) => {
136 // Sent to daily-api as the `x-captcha-response` header by betterAuthRegister.
137 const { turnstileToken } = values;
138 await betterAuthRegister({
139 name: values['traits.name'] as string,
140 email: values['traits.email'] as string,
141 password: values.password as string,
142 turnstileToken,
143 username: values['traits.username'] as string,
144 experienceLevel: values['traits.experienceLevel'] as string,
145 company: (values['traits.company'] as string) || undefined,
146 title: (values['traits.title'] as string) || undefined,
147 cloudProvider: (values['traits.cloudProvider'] as string) || undefined,
148 acceptedMarketing: values['traits.acceptedMarketing'] as boolean,
149 referral: referral ?? undefined,
150 referralOrigin: referralOrigin ?? undefined,
151 timezone,
152 region: geo?.region,
153 signupIntent,
154 });
155 };
156
157 const onSocialRegistration = async (provider: string) => {
158 const additionalData = { timezone, signupIntent };

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected