Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added refresh token #148

Merged
merged 1 commit into from
May 11, 2018
Merged

Added refresh token #148

merged 1 commit into from
May 11, 2018

Conversation

tscheepers
Copy link
Contributor

As stated in the documentation by @moneybird, the refresh token should be persisted in all cases. This is not possible with the current implementation.

The response contains an Access token which you can use to connect with the API. The Refresh token can be used to retreive a new access token in case the access token can expire. In that case, an expires_in is given. Both the access token and the refresh token should be persisted to be used for future requests.

It's a bit unclear to me whether the access token can actually expire, since I was not able to retrieve an expires_in. In any case we should be able to persist the refresh just in case.

Another small change here is making the getAuthUrl public since we then could use framework methods for redirecting, e.g. in Laravel: return redirect($connection->getAuthUrl());.

@stephangroen stephangroen merged commit 06ce3c2 into picqer:master May 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants