mercredi 9 août 2017

Ember offline login

I'm making an application in ember for the first time and I'm building a login system into the application. I'm using the simple-auth plugin to build the login functionality from http://ift.tt/2vEABUL

I know that the user will be able to view the passcode in the source code but this application will only be on one device.

Now I want to build my app without using a server to retrieve the login and password, so I want the app to essentially work offline with a hard coded password and login (for now). I'm not sure how to go about this but I'm pretty sure it will be in this area.

authenticate() {    // This is to authenicate the user
        let { identification, password } = this.getProperties('identification', 'password');
        this.get('session').authenticate('authenticator:oauth2', identification, password).catch((reason) => {
            this.set('errorMessage', reason.error || reason);
        });
    }

This sends the login and password to a service "authenticator:oauth2" however this is currently not set up is there a way to by pass this area.




Aucun commentaire:

Enregistrer un commentaire