Is it possible to only check the password with ember-simple-auth? I want the user to re-enter their password if they want to delete their account. Can this password check be done without touching the store using ember-simple-auth?
If I use code similar to this:
let loginPromise =
session.authenticate('authenticator:jwt', { identification, password })
return loginPromise.then(() => true).catch(() => false) // allow/deny to delete the account
then the session is invalidated if the password is wrong, so the user is signed out. I want, however, to only disable the "Delete Account" button if the password is wrong (without any other side effects like signing in).
session.data.authenticated.passwordafter login and comparing it with this when required. If anyone is having better solutions, please let me know.Ember.Service.extend({ ajax: Ember.inject.service(); validatePassword(username, password) { return this.get('ajax').post(${ENV.host}/users/sign_in, { data: { user: { name: username, password: password } } }) } ... })