use devise instead auth0

This commit is contained in:
João Geonizeli
2021-08-09 22:07:48 -03:00
parent 15abf28e80
commit 645b818f6c
48 changed files with 519 additions and 399 deletions

View File

@@ -1,12 +0,0 @@
# frozen_string_literal: true
module Authenticable
def current_auth
@current_auth ||= Auth::Authenticate.new(bearer_token).profile
end
def bearer_token
pattern = /^Bearer /
header = request.headers["Authorization"]
header.gsub(pattern, "") if header&.match(pattern)
end
end