After signup, first login attempt fails

2 posts, 0 answers
  1. Randy
    Randy avatar
    10 posts
    Member since:
    Dec 2015

    Posted 12 Jul Link to this post

    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);
                });
            };

     

  2. Martin
    Admin
    Martin avatar
    67 posts

    Posted 15 Jul Link to this post

    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.

     
Back to Top