refactor: introduce Account and account methods to AccountService
This MR introduces the Account
interface and changes the flow for adding access tokens to use this interface.
This MR is best-reviewed commit-by-commit:
- extracting
getUserForCredentialsOrFail
into a separate module, we'll need this for migrating credentials to accounts - create
Account
and change the flow for adding tokens to use accounts - We are sanitizing the
instanceUrl
to not have the trailing slash. Since thetoken_input
module is now responsible for constructing theaccount
, we have to sanitize the URL intoken_input
Related to #298 (closed)
Edited by Tomas Vik