From 9224f031cfcb8283566f9d1dcc336ae644faf062 Mon Sep 17 00:00:00 2001 From: DJ Mountney Date: Fri, 19 Aug 2016 18:51:56 -0700 Subject: Pass the remember_me option into the u2f form and support it while authenticating Matches the changes done for non-u2f two-factor auth --- app/views/u2f/_authenticate.html.haml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/views/u2f') diff --git a/app/views/u2f/_authenticate.html.haml b/app/views/u2f/_authenticate.html.haml index 75fb0e303ad..9657101ace5 100644 --- a/app/views/u2f/_authenticate.html.haml +++ b/app/views/u2f/_authenticate.html.haml @@ -20,6 +20,8 @@ %div %p We heard back from your U2F device. Click this button to authenticate with the GitLab server. = form_tag(new_user_session_path, method: :post) do |f| + - resource_params = params[resource_name].presence || params + = hidden_field_tag 'user[remember_me]', resource_params.fetch(:remember_me, 0) = hidden_field_tag 'user[device_response]', nil, class: 'form-control', required: true, id: "js-device-response" = submit_tag "Authenticate via U2F Device", class: "btn btn-success" -- cgit v1.2.1