Tidy up session_token
This commit is contained in:
@@ -100,4 +100,8 @@ module Authentication
|
||||
Current.session.destroy
|
||||
cookies.delete(:session_token)
|
||||
end
|
||||
|
||||
def session_token
|
||||
cookies[:session_token]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -46,7 +46,7 @@ class Sessions::MagicLinksController < ApplicationController
|
||||
|
||||
respond_to do |format|
|
||||
format.html { redirect_to after_sign_in_url(magic_link) }
|
||||
format.json { render json: { session_token: cookies[:session_token] } }
|
||||
format.json { render json: { session_token: session_token } }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user