Skip to content

Release of V3 - new methods and refresh tokens now supported

Compare
Choose a tag to compare
@dcblogdev dcblogdev released this 26 Jan 22:30
· 17 commits to master since this release

This major release has some breaking changes additional columns added to the migration added:

  • refresh_token
  • scope

Changed expires_in to DATETIME type.

added new methods:

isConnected returns true when there is token data.

Dropbox::isConnected()

disconnect() disconnects from Dropbox and deleted the token then redirects to the path provided, defaults to /

Dropbox::disconnect($redirectPath = '/')

Added new config option,

Set access type, options are offline and online
* Offline - will return a short-lived access_token and a long-lived refresh_token that can be used to request a new short-lived access token as long as a user's approval remains valid.
* Online - will return a short-lived access_token

'accessType' => env('DROPBOX_ACCESS_TYPE', 'offline')

Added support for refresh tokens, now when a token is about to expire and there is a refresh token stored, a new access_token will be refreshed by using the refresh token this happens automatically when any request to Dropbox is attempted.