Lior Nabat (BelugaHealth)
12/17/2022, 1:08 PMMeir Wahnon
12/17/2022, 1:17 PMLior Nabat (BelugaHealth)
12/17/2022, 1:21 PMLior Nabat (BelugaHealth)
12/17/2022, 1:21 PMMeir Wahnon
12/17/2022, 1:29 PMMeir Wahnon
12/17/2022, 1:29 PMMeir Wahnon
12/17/2022, 1:29 PMLior Nabat (BelugaHealth)
12/17/2022, 1:30 PMLior Nabat (BelugaHealth)
12/17/2022, 1:31 PMMeir Wahnon
12/17/2022, 1:31 PMLior Nabat (BelugaHealth)
12/17/2022, 1:32 PMLior Nabat (BelugaHealth)
12/17/2022, 1:32 PMLior Nabat (BelugaHealth)
12/17/2022, 1:36 PMMeir Wahnon
12/17/2022, 1:39 PMLior Nabat (BelugaHealth)
12/17/2022, 1:40 PMfunc (c *Client) OPTSignIn(ctx context.Context, request *requests.OTPSignIn) error {
identifier := request.Phone
if err := c.client.Auth.OTP().SignIn(auth.MethodSMS, identifier, request.R, &auth.LoginOptions{}); err != nil {
c.logger.Errorf("user signed in email: %s completed with error: %v", request.Phone, err)
return err
}
c.logger.Infof("user signed in successfully, email: %s", request.Phone)
return nil
}Meir Wahnon
12/17/2022, 1:44 PMc.client.Auth.OTP().SignIn
use:
c.client.Auth.OTP().SignUpOrIn
if what you mean , is that user can sign up or in , in every attemptLior Nabat (BelugaHealth)
12/17/2022, 1:45 PMLior Nabat (BelugaHealth)
12/17/2022, 1:46 PMfunc (c *Client) OTPSignUp(ctx context.Context, request *requests.OTPSignUp) error {
identifier := request.Phone
user := &auth.User{
Name: request.Name,
Phone: request.Phone,
Email: request.Email,
}
if err := c.client.Auth.OTP().SignUp(auth.MethodSMS, identifier, user); err != nil {
c.logger.Errorf("user signed up name: %s, email: %s, phone: %s completed with error: %v", request.Name, request.Email, request.Phone, err)
return err
}
c.logger.Infof("user signed up successfully, name: %s, email: %s, phone: %s", request.Name, request.Email, request.Phone)
return nil
}Lior Nabat (BelugaHealth)
12/17/2022, 1:46 PMMeir Wahnon
12/17/2022, 1:46 PMMeir Wahnon
12/17/2022, 1:46 PMLior Nabat (BelugaHealth)
12/17/2022, 1:46 PMLior Nabat (BelugaHealth)
12/17/2022, 1:46 PMMeir Wahnon
12/17/2022, 1:47 PMLior Nabat (BelugaHealth)
12/17/2022, 1:47 PMLior Nabat (BelugaHealth)
12/17/2022, 1:47 PMMeir Wahnon
12/17/2022, 1:51 PMMeir Wahnon
12/17/2022, 1:52 PMLior Nabat (BelugaHealth)
12/17/2022, 1:53 PMLior Nabat (BelugaHealth)
12/17/2022, 1:54 PMLior Nabat (BelugaHealth)
12/17/2022, 1:54 PMMeir Wahnon
12/17/2022, 1:57 PMfull signup , means 2 funcs:
1. SignUp call
descopeClient.Auth.OTP().SignUp(deliveryMethod, identifier, user)
2. Verify :
descopeClient.Auth.OTP().VerifyCode(deliveryMethod, identifier, code, w)Meir Wahnon
12/17/2022, 1:58 PMLior Nabat (BelugaHealth)
12/17/2022, 1:59 PMLior Nabat (BelugaHealth)
12/17/2022, 1:59 PMLior Nabat (BelugaHealth)
12/17/2022, 2:03 PMLior Nabat (BelugaHealth)
12/17/2022, 2:03 PMMeir Wahnon
12/17/2022, 2:11 PM333 ?
is that user appearing in user table with that number ?Lior Nabat (BelugaHealth)
12/17/2022, 2:12 PMMeir Wahnon
12/17/2022, 2:12 PMMeir Wahnon
12/17/2022, 2:13 PMLior Nabat (BelugaHealth)
12/17/2022, 2:13 PMMeir Wahnon
12/17/2022, 2:17 PMMeir Wahnon
12/17/2022, 2:18 PM+972-5****** ?Lior Nabat (BelugaHealth)
12/17/2022, 2:20 PMLior Nabat (BelugaHealth)
12/17/2022, 2:23 PMMeir Wahnon
12/17/2022, 2:24 PMLior Nabat (BelugaHealth)
12/17/2022, 2:28 PMLior Nabat (BelugaHealth)
12/17/2022, 2:29 PMLior Nabat (BelugaHealth)
12/17/2022, 2:31 PMMeir Wahnon
12/17/2022, 2:33 PMLior Nabat (BelugaHealth)
12/17/2022, 2:34 PMMeir Wahnon
12/17/2022, 2:37 PMMeir Wahnon
12/17/2022, 2:38 PMMeir Wahnon
12/17/2022, 2:44 PMVerifyCode
without the
w writer argumentLior Nabat (BelugaHealth)
12/17/2022, 2:50 PMLior Nabat (BelugaHealth)
12/17/2022, 2:50 PMLior Nabat (BelugaHealth)
12/17/2022, 2:50 PMMeir Wahnon
12/17/2022, 2:51 PMLior Nabat (BelugaHealth)
12/17/2022, 2:56 PMLior Nabat (BelugaHealth)
12/17/2022, 2:59 PMLior Nabat (BelugaHealth)
12/17/2022, 2:59 PMLior Nabat (BelugaHealth)
12/17/2022, 2:59 PMMeir Wahnon
12/17/2022, 2:59 PM