app/controllers/devise_jwt_auth/unlocks_controller.rb
# this action is responsible for generating unlock tokens and
# sending emails
this action is responsible for generating unlock tokens and
sending emails
this action is responsible for generating unlock tokens and sending emails
def show
      @resource = resource_class.unlock_access_by_token(params[:unlock_token])
      if @resource.persisted?
        yield @resource if block_given?
        redirect_header_options = { unlock: true }
        redirect_headers = @resource.create_named_token_pair
                             .merge(redirect_header_options)
        update_refresh_token_cookie
        redirect_url = after_unlock_path_for(@resource)
        redirect_to_link = DeviseJwtAuth::Url.generate(redirect_url, redirect_headers)
        redirect_to redirect_to_link
      else
        render_show_error
      end
    end
def show @resource = resource_class . unlock_access_by_token ( params [ :unlock_token ] ) if @resource . persisted? yield @resource if block_given? redirect_header_options = { unlock : true } redirect_headers = @resource . create_named_token_pair . merge ( redirect_header_options ) update_refresh_token_cookie redirect_url = after_unlock_path_for ( @resource ) redirect_to_link = DeviseJwtAuth :: Url . generate ( redirect_url , redirect_headers ) redirect_to redirect_to_link else render_show_error end end
this action is responsible for generating unlock tokens and
sending emails
this action is responsible for generating unlock tokens and sending emails