Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No longer able to login #121

Closed
hereiam133 opened this issue Nov 29, 2017 · 3 comments
Closed

No longer able to login #121

hereiam133 opened this issue Nov 29, 2017 · 3 comments

Comments

@hereiam133
Copy link

With this latest release of the cli (2.5.0), the lib no longer allows logging in.

We have the following gulp task setup (and have tried adding a logout function 1st to clear whatever is in the mem)

gulp.task('monaca-login', (done) => {
     monaca.login(monacaEmail, monacaPassword).then(
        () => {
            done();
        },
        (error) => {
            console.log('monaca-login', error);
            if (error) throw error;
        }
    );
});

this results in the following issue

monaca-login { status: 'fail',
code: 400,
message: 'Your client is old version. Please upgrade to the latest version.' }

@andipavllo
Copy link
Contributor

monaca-lib requires the clientType to be specified during its initialization. For example:

var Monaca = require('monaca-lib').Monaca,
   monaca = new Monaca({clientType: 'api'});

We haven't included it in the getting started guide because we didn't think many developers would have been interested in using it standalone but I guess it's time now.

@hereiam133
Copy link
Author

@andipavllo Thank you, that has solved the issue, it would be great to have that added to the readme!

@andipavllo
Copy link
Contributor

@hereiam133 just did it. I suggest you to use clientType: 'lib' instead of api, we have enabled it just for this purpose. Sorry for the trouble!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants