Start a new topic

iOS SDK 3.3.0 User.signup doesn't allow specification of email for Automatic Email Verification

In SDK 1.4, creating a new user for an app that is set for Automatic Email Verification required the "fieldsAndValues" to be set in the userWithUsername method.


In SDK 3.3.0, it seems that this is not possible in the User.signup method.  Am I missing something?  When I now use the User.signup method with username and password, I get failure code 4 (operation couldn't be completed).  I presume this is because my app is set for Automatic Email Verification, but the email is not set at the time the new user is created?


The documentation for "A realistic example" states "this adds in some additional fields", but the example doesn't add additional fields? 


Thanks


Graeme,


  1. If you disable "Automatic Email Verification", does the signup work for you?
  2. Can you provide me with the screenshot of the "failure code 4 (operation couldn't be completed)"?


Thanks,

Pranav

Kinvey Support

Hi Pranav


1. Yes, it does work if "Automatic Email Verification" is not enabled.

2. See attached. That is the error.localizedDescription returned by User.signup(username, password)


Thanks

Graeme

Hi Pranav


Has this been escalated to Engineering?  Can you provide me an estimate of when an update to the SDK will be released?


Thanks

Graeme

Graeme,

Yes, I have escalated this to engineering and will get back to you as soon as I have more info.

Thanks,
Pranav
Kinvey Support

 

Thanks Pranav

Internal Note: MLIBZ-1393

I am having the same issue - I have email verification turned on, and signup fails with "Email Verification is required for this app, but an email address was not provided for this user. Please try again and include an email address in the request.", but I see no way to include an email address on signup.

Hello Michael,


What version of the Kinvey iOS SDK are you using? This problem was fixed in version 3.3.3 and our most recent version is version 3.3.6.


Regards,


Billy Gee

Kinvey Support

Thanks for the fast reply. I am using 3.3.6. How do I pass an email address to signup? Your API reference has only this method for signup, which doesn't include an email address. As an experiment, I tried adding an parameter called "email", but that gave an error. Does username have to be an email address? In our implementation, it is a phone number.


open class func signup<UserType: User>(username: String? = nil, password: String? = nil, user: UserType? = nil, client: Client = Kinvey.sharedClient, completionHandler: ((UserType?, Swift.Error?) -> Void)? = nil) -> Request


I am using 3.3.6. How do I pass an email address to signup? The docs show the signup endpoint takes only a username and a password. Does the username have to be an email address? We are currently using phone numbers for username.

Hello Michael,


Have you reviewed the signup section of the iOS Users Guide at the following URL?


http://devcenter.kinvey.com/ios/guides/users#signup


The specific code to focus on can be found in the following examples.


let user = CustomUser()

user.address = "Boston MA"

User.signup(user: user) { newUser, error in

    if let user = newUser {

        //success

    } else {

        //failure

    }

}


It doesn't not have to be a CustomUser class either. It can also be the regular User class


let user = User()

user.email = "my-email@kinvey.com"

User.signup(user: user) { ... }


If you do, or have tried this and you are still seeing this problem, please let us know and we will continue to investigate.


Regards,


Billy Gee

Kinvey Customer Support

Login or Signup to post a comment