Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump passwordless from 1.5.0 to 1.6.0 #179

Merged
merged 6 commits into from
May 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ gem "tailwindcss-rails"
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: %i[ windows jruby ]
gem 'paper_trail'
gem "passwordless", "~> 1.5"
gem "passwordless", "~> 1.6"
gem "graphql", "~> 2.3"
gem "graphiql-rails"
gem "view_component"
Expand Down
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ GEM
net-protocol
net-protocol (0.2.2)
timeout
net-smtp (0.4.0.1)
net-smtp (0.5.0)
net-protocol
nio4r (2.7.0)
nio4r (2.7.1)
nokogiri (1.16.4-aarch64-linux)
racc (~> 1.4)
nokogiri (1.16.4-arm64-darwin)
Expand All @@ -202,7 +202,7 @@ GEM
paper_trail (15.1.0)
activerecord (>= 6.1)
request_store (~> 1.4)
passwordless (1.5.0)
passwordless (1.6.0)
bcrypt (>= 3.1.11)
rails (>= 5.1.4)
pg (1.5.6)
Expand Down Expand Up @@ -372,7 +372,7 @@ DEPENDENCIES
letter_opener
money
paper_trail
passwordless (~> 1.5)
passwordless (~> 1.6)
pg (~> 1.5)
puma (>= 5.0)
rack-cors
Expand Down
17 changes: 17 additions & 0 deletions app/views/shared/_flash.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,23 @@
</div>
<% end %>

<% if flash[:alert] %>
<div class="rounded-md bg-blue-50 p-4">
<div class="flex">
<div class="flex-shrink-0">
<svg class="h-5 w-5 text-blue-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd" />
</svg>
</div>
<div class="ml-3 flex-1 md:flex md:justify-between">
<p class="text-sm text-blue-700">
<%= flash[:alert] %>
</p>
</div>
</div>
</div>
<% end %>

<% if flash[:success].present? %>
<div class="rounded-md bg-green-50 p-4" data-controller="flash">
<div class="flex">
Expand Down
1 change: 1 addition & 0 deletions config/initializers/passwordless.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@
config.success_redirect_path = '/' # After a user successfully signs in
config.failure_redirect_path = '/' # After a sign in fails
config.sign_out_redirect_path = '/' # After a user signs out
config.paranoid = true
end
4 changes: 2 additions & 2 deletions spec/system/authentications_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
end

context "when an email does not exist" do
it "shows the user an error that their email does not exist" do
it "does not show the user that we couldn't find their e-mail address" do
visit root_path
fill_in "passwordless[email]", with: Faker::Internet.email
click_button "Sign in"
expect(page).to have_content("We couldn't find a user with that email address")
expect(page).to have_content("We've sent you an email with a secret token")
end
end

Expand Down
Loading