Skip to content

client.refresh without connecting #67

@serv

Description

@serv

Problem

Currently, getting refresh token goes something like this

client_hash = {
  api_key: 'API_KEY',
  api_secret: 'API_SECRET',
  redirect_uri: 'REDIRECT_URI',
  auth_code: 'AUTH_CODE'
}

client = Napster::Client.new(client_hash)
client.connect
client.refresh # => returns new access_token by refreshing it

This flow currently requires client.connect to happen before client.refresh.
We need a way to refresh token without client.connect.

Acceptance

Support this flow.

client_hash = {
  api_key: 'API_KEY',
  api_secret: 'API_SECRET',
  refresh_token: 'REFRESH_TOKEN'
}

client = Napster::Client.new(client_hash)
client.refresh # => returns new access_token by refreshing it

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions