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

Fix rendering for Turbo #118

Merged
merged 2 commits into from
Feb 9, 2022
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
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@

## Unreleased

### 0.11.0 (2021-12-19)
### Changed

- Reset session at sign_in to protect from session fixation attacks ([#108](https://github.com/mikker/passwordless/pull/108))

### Added

- Reset session at sign_in to protect from session fixation attacks ([108](https://github.com/mikker/passwordless/pull/108))
- Test helpers for MiniTest and RSpec ([#90](https://github.com/mikker/passwordless/pull/90))

### Fixed

- Fixed support for Turbo Drive ([#116](https://github.com/mikker/passwordless/pull/116))

## 0.10.0 (2020-10-07)

### Added
Expand Down
6 changes: 4 additions & 2 deletions app/controllers/passwordless/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ def create
else
Passwordless.after_session_save.call(session)
end
end

render
render :create, status: :ok
else
render :create, status: :unprocessable_entity
end
end

# get '/sign_in/:token'
Expand Down
2 changes: 1 addition & 1 deletion test/controllers/passwordless/sessions_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class Helpers
params: {passwordless: {email: "invalidemail"}},
headers: {:"User-Agent" => "an actual monkey"}
)
assert_equal 200, status
assert_equal 422, status

assert_equal 0, ActionMailer::Base.deliveries.size
end
Expand Down