Created
March 29, 2017 08:33
-
-
Save sergiogomez/063614070c1ed105d488a8eda937e0b0 to your computer and use it in GitHub Desktop.
Workaround for JWT::ExpiredSignature exception with warden-jwt_auth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/controllers/users/sessions_controller.rb | |
class Users::SessionsController < Devise::SessionsController | |
... | |
def destroy | |
remove_authorization_header! unless current_user | |
sign_out(resource_name) | |
end | |
... | |
private | |
... | |
def remove_authorization_header! | |
request.env.delete('HTTP_AUTHORIZATION') | |
end | |
... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment