This is a migrated thread and some comments may be shown as answers.

After signup, first login attempt fails

1 Answer 42 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Randy
Top achievements
Rank 1
Randy asked on 12 Jul 2016, 10:28 PM

I used the signup and login code from the hybrid friends app template. Seems to work fairly well, however after a new user registration, the first attempt to login with the new account fails. second and subsequent logins work fine. At first I thought the backend system wasn't creating the account fast enough, but that does not seem to be the issue. Has anyone else run into this? (Function below)

// Register user after required fields (username and password) are validated in Backend Services
        var signup = function () {
            Everlive.$.Users.register(
                dataSource.Username,
                dataSource.Password,
                dataSource)
            .then(function () {
                app.showAlert('Please login now to begin using AppName.', 'Registration Complete');
                app.mobileApp.navigate('#welcome');
            },
            function (err) {
                app.showError(err.message);
            });
        };

 

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 15 Jul 2016, 04:10 PM

Hi Randy,

The provided function for registering new users seems OK.

What is the error returned the first time you try to login after registering a new user?

Could you please provide a sample code with which to reproduce the described behavior, as I have just tested the Friends sample and it works just fine.

Also, you can examine the new version of the Friends sample from here.

Waiting forward for you reply.

Regards,
Martin
Telerik by Progress
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
Tags
General Discussion
Asked by
Randy
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or