Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rails authentication for an API
- <server>/users/connect
- def connect
- user = User.find_by_email(params[:email])
- password = params[:password]
- # here is the part I'm pseudo coding out
- if user.is_valid_password(password)
- ...do my stuff...
- end
- render :json ...etc...
- end
- config.token_authentication_key = :nameofyourapikeyhere
- devise … token_authenticatable, ...
Add Comment
Please, Sign In to add comment