Skip to content

Commit

Permalink
Merge pull request #591 from plural/oauth-login-error-handling
Browse files Browse the repository at this point in the history
Oauth login error handling
  • Loading branch information
plural authored Feb 8, 2022
2 parents 181848d + ff6c593 commit 332a157
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/Resources/views/Security/login.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</p>
<form id="login" class="vertical" action="{{ path('oauth_server_auth_login_check') }}" method="post">
{% if(error) %}
<div class='form_error'>{{ error }}</div>
<div class="alert alert-danger">{{ error }}</div>
{% endif %}
<div class="form-group">
<label for="username">NetrunnerDB Username</label>
Expand Down
2 changes: 1 addition & 1 deletion src/AppBundle/Controller/SecurityController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function loginAction(AuthenticationUtils $authenticationUtils)
'/Security/login.html.twig',
[
'last_username' => $authenticationUtils->getLastUsername(),
'error' => $authenticationUtils->getLastAuthenticationError(),
'error' => ($authenticationUtils->getLastAuthenticationError() == null ? "" : "Invalid credentials."),
]
);
}
Expand Down

0 comments on commit 332a157

Please sign in to comment.