Module: Sorcery::Model::Submodules::MagicLogin::ClassMethods
- Defined in:
- lib/sorcery/model/submodules/magic_login.rb
Instance Method Summary collapse
-
#load_from_magic_login_token(token) ⇒ Object
Find user by token, also checks for expiration.
Instance Method Details
#load_from_magic_login_token(token) ⇒ Object
Find user by token, also checks for expiration. Returns the user if token found and is valid.
55 56 57 58 59 |
# File 'lib/sorcery/model/submodules/magic_login.rb', line 55 def load_from_magic_login_token(token) token_attr_name = @sorcery_config.magic_login_token_attribute_name token_expiration_date_attr = @sorcery_config.magic_login_token_expires_at_attribute_name load_from_token(token, token_attr_name, token_expiration_date_attr) end |