gonzalo-bulnes/simple_token_authentication

how to auth 2 different models with same alias ?

MathieuDerelle opened this issue · 0 comments

  # acts_as_token_authentication_handler_for SpecialUser, as: :user, fallback: :none
  # acts_as_token_authentication_handler_for AltUser, as: :user, fallback: :none

when a request comes in with X-User-Email & X-User-Token (with credentials of SpecialUser), one DB query is done (select in AltUser table)

and nobody is authenticated...

current_special_user & current_alt_user are both nil