#245: disable account switcher after user logged to new account during oauth (ignore prompt=slect_account)

This commit is contained in:
SleepWalker
2017-01-29 14:12:08 +02:00
parent c33f13e49a
commit a4fd1314c2
2 changed files with 10 additions and 20 deletions

View File

@@ -19,12 +19,16 @@ export default class PasswordState extends AbstractState {
resolve(context, {password, rememberMe}) {
const {auth: {login}} = context.getState();
context.run('login', {
return context.run('login', {
password,
rememberMe,
login
})
.then(() => context.setState(new CompleteState()))
.then(() => {
context.run('setAccountSwitcher', false);
context.setState(new CompleteState());
})
.catch((err = {}) => err.errors || logger.warn(err));
}