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

Allow access request in params #179

Merged
merged 2 commits into from
Nov 30, 2022
Merged

Allow access request in params #179

merged 2 commits into from
Nov 30, 2022

Conversation

thibaultleouay
Copy link
Contributor

It allows access request in params
also add a methods to get the token

@rfoel
Copy link
Owner

rfoel commented Nov 29, 2022

I wonder if it wouldn't be easiser to just pass the access_token to the instance instead of passing it in every request.

const strava = new Strava({ access_token })

This way you could implement a logic that do not try to refresh the token if it was passed as a parameter. Does it make sense?

@thibaultleouay
Copy link
Contributor Author

Yep but I can instantiate one strava Instance for my app, get the new refresh token, then start doing request
Also I'd love to instantiate one Strava Instance ('same app') and update different users with different token

We could also instantiate the strava client with access_token sure !

@rfoel
Copy link
Owner

rfoel commented Nov 30, 2022

I will merge it as it does not break the current API, but we could elaborate more this feature.

@rfoel rfoel merged commit 1acea80 into rfoel:main Nov 30, 2022
github-actions bot pushed a commit that referenced this pull request Nov 30, 2022
# [2.1.0](v2.0.2...v2.1.0) (2022-11-30)

### Features

* Allow access request in params  ([#179](#179)) ([1acea80](1acea80))
@github-actions
Copy link

🎉 This PR is included in version 2.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants