Login form will force username if there is an authenticated user

This commit is contained in:
garrettmills
2020-05-22 09:54:48 -05:00
parent decb83bdbb
commit 4f8c4d641f
5 changed files with 29 additions and 2 deletions

View File

@@ -75,6 +75,14 @@ export default class AuthLoginForm extends Component {
this.button_text = 'Next'
}
async vue_on_create() {
const auth_user = await auth_api.get_authenticated_user()
if ( auth_user ) {
this.username = auth_user
await this.step_click()
}
}
async on_key_up(event) {
if ( event.keyCode === 13 ) {
// Enter was pressed