Skip to content

Instantly share code, notes, and snippets.

@johnnytomcat
Last active August 21, 2018 16:04
Show Gist options
  • Save johnnytomcat/ff01ea933ea39395eac7e8d954d7b03b to your computer and use it in GitHub Desktop.
Save johnnytomcat/ff01ea933ea39395eac7e8d954d7b03b to your computer and use it in GitHub Desktop.
# frozen_string_literal: true
class SessionsController < Devise::SessionsController
def create
super { @token = current_token }
end
private
def current_token
request.env['warden-jwt_auth.token']
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment