Class: Devise::Api::TokensService::Refresh

Inherits:
BaseService
  • Object
show all
Defined in:
app/services/devise/api/tokens_service/refresh.rb

Instance Method Summary collapse

Instance Method Details

#callObject



10
11
12
13
14
15
# File 'app/services/devise/api/tokens_service/refresh.rb', line 10

def call
  return Failure(error: :expired_refresh_token) if devise_api_token.refresh_token_expired?

  devise_api_token = yield create_devise_api_token
  Success(devise_api_token)
end