Skip to content

Instantly share code, notes, and snippets.

View jtgi's full-sized avatar
🎱

0xjtgi jtgi

🎱
View GitHub Profile
@onyxrev
onyxrev / application_controller.rb
Created March 1, 2014 22:16
General hackery with API-based auth and Devise
class ApplicationController < ActionController::Base
# ...
private
# from https://gist.github.com/josevalim/fb706b1e933ef01e4fb6
def authenticate_user_from_token!
email = params[:email].presence
user = email && User.where(email: email).first