app/controllers/api/sessions_controller.rb
#Verifies the access_token so the client app would know if to login the user.
Verifies the access_token so the client app would know if to login the user.
Verifies the access_token so the client app would know if to login the user .
def verify_access_token
      user = User.find_by(access_token: params[:session][:access_token])
        if user
          render text: "verified", status: 200
        else
          render text: "Token failed verification", status: 422
        end
    end
def verify_access_token user = User . find_by ( access_token : params [ :session ] [ :access_token ] ) if user render text : "verified" , status : 200 else render text : "Token failed verification" , status : 422 end end
Verifies the access_token so the client app would know if to login the user.
Verifies the access_token so the client app would know if to login the user .