BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
76873ce4
Commit
76873ce4
authored
May 09, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move "invalid 2FA code" error message to the flash
This makes it consistent with the Invalid email/password error message from the previous step.
parent
3fb0fedd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
4 deletions
+1
-4
sessions_controller.rb
app/controllers/sessions_controller.rb
+1
-1
two_factor.html.haml
app/views/devise/sessions/two_factor.html.haml
+0
-3
No files found.
app/controllers/sessions_controller.rb
View file @
76873ce4
...
...
@@ -63,7 +63,7 @@ class SessionsController < Devise::SessionsController
sign_in
(
user
)
else
@error
=
'Invalid two-factor code
'
flash
.
now
[
:alert
]
=
'Invalid two-factor code.
'
render
:two_factor
and
return
end
else
...
...
app/views/devise/sessions/two_factor.html.haml
View file @
76873ce4
...
...
@@ -4,9 +4,6 @@
%h3
Two-factor Authentication
.login-body
=
form_for
(
resource
,
as:
resource_name
,
url:
session_path
(
resource_name
),
method: :post
)
do
|
f
|
-
if
@error
.alert.alert-danger
=
@error
=
f
.
text_field
:otp_attempt
,
class:
'form-control'
,
placeholder:
'Two-factor authentication code'
,
required:
true
,
autofocus:
true
%p
.help-block.hint
If you've lost your phone, you may enter one of your recovery codes.
.prepend-top-20
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment