Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Fitbit Laravel Package

socialiteproviders/fitbit

Fitbit OAuth provider for Laravel Socialite. Lets your app authenticate users with their Fitbit accounts through Socialite's familiar driver interface. Install via Composer, configure your Fitbit client ID and secret, and add Fitbit login to your Laravel application.

View on GitHub
Deep Wiki
Context7

Fitbit OAuth provider for Laravel Socialite — adds Fitbit authentication to socialiteproviders/manager, letting users sign in with their Fitbit account via the standard Socialite API.

Install the package, wire up your Fitbit client ID and secret, and register the event listener to get a ready-to-use FitbitProvider. It handles the OAuth 2.0 flow and returns a Socialite user with Fitbit profile details.

  • Socialite::driver('fitbit') support
  • Standard redirect() / user() flow
  • Returns Fitbit profile ID, name, and avatar
  • Configurable scopes for profile and activity data
  • Drop-in integration with existing Socialite setups
Frequently asked questions about Fitbit
How do I install the Fitbit provider for Laravel Socialite?
Install it with Composer by running composer require socialiteproviders/fitbit. Laravel Socialite and the socialiteproviders/manager package should already be available in the application so the provider can be resolved. After installation, add your Fitbit credentials to config/services.php and use the fitbit driver like any other Socialite driver.
Where do I put my Fitbit client ID and secret in Laravel?
Add a fitbit entry to config/services.php with client_id, client_secret, and redirect values taken from your Fitbit application settings. Keep the real values in your .env file and reference them with env() calls so secrets never land in version control. Remember to clear or re-cache config after changing those values.
How do I register the Fitbit Socialite driver in Laravel?
The provider is resolved through the SocialiteProviders manager, which listens for the SocialiteWasCalled event. On current manager versions this listener is registered automatically; on older setups you add it to your EventServiceProvider. Once registered, call Socialite::driver('fitbit') wherever you need it.
Which Laravel and Socialite versions does socialiteproviders/fitbit support?
Because the package is a subtree split of the SocialiteProviders/Fitbit provider, its requirements track the parent SocialiteProviders/Providers repository. Check the composer.json of the version you install for the exact illuminate/support and socialite constraints. Review those constraints before upgrading Laravel or Socialite in an existing app.
How do I set up the Fitbit OAuth redirect and callback routes?
Create a redirect route that calls Socialite::driver('fitbit')->redirect() and a callback route that calls ->user() on the same driver. The callback URL registered in your Fitbit app must match the redirect value in config/services.php exactly, including scheme and trailing slash. Keep both routes as GET requests and outside auth middleware so unauthenticated users can start the flow.
What user data does the Fitbit provider return after login?
After the callback you get a standard Socialite user object populated with the Fitbit account details the provider maps, such as the Fitbit user ID and profile fields. That object also carries the access token you need for further Fitbit API calls. Store the token against your user record if you plan to fetch data later.
Can I read Fitbit activity, sleep, and heart-rate data with this package?
This package handles the OAuth handshake and profile retrieval, not the Fitbit health endpoints themselves. After authentication, take the token from the Socialite user and call Fitbit's Web API for steps, sleep logs, and heart-rate time series. Most apps add a thin HTTP client or a dedicated Fitbit API wrapper for that part.
What are the alternatives to socialiteproviders/fitbit for Fitbit OAuth in Laravel?
You can require the SocialiteProviders/Providers monorepo directly, or use league/oauth2-client with a community Fitbit provider. Staying on Laravel Socialite plus this driver is usually the least effort if Socialite already powers your other logins. Hand-rolling the Fitbit OAuth flow is possible but leaves state handling, token refresh, and error handling to you.
How do I test Fitbit login in Laravel without calling the real Fitbit API?
Mock the driver with Socialite::shouldReceive('driver')->with('fitbit') and return a fake user object, or use Socialite::fake() if your Socialite version supports it. That lets you exercise your callback controller and user creation logic without network calls. Cover the failure path too, such as a denied consent screen or an invalid state parameter.
Is socialiteproviders/fitbit maintained and safe to use in production?
It is a read-only split of the SocialiteProviders/Fitbit provider, so fixes land in the SocialiteProviders/Providers monorepo and are published here on the same release cadence. Pin a specific version in composer.json and read the monorepo changelog before upgrading. In production, store tokens securely, handle token expiry and refresh, and watch Fitbit's API rate limits.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib