- How do I install socialiteproviders/tiktok in Laravel?
- Install the package with Composer, including socialiteproviders/tiktok and socialiteproviders/manager. Register the SocialiteWasCalled event listener for TikTokExtendSocialite, then add your TikTok client_id, client_secret, and redirect URI to config/services.php. After that, use the familiar Socialite::driver('tiktok')->redirect() and callback flow.
- Do I need to replace my existing Laravel authentication system to use this package?
- No. This package is a thin Socialite driver, not a separate authentication framework, so it composes with an existing Laravel auth stack that already uses Socialite. If your app does not already use Socialite, you would be adopting Socialite, the SocialiteProviders manager, and this driver together as a bundle.
- What user profile fields does the TikTok Socialite driver return?
- The driver retrieves TikTok profile fields such as open_id, union_id, display name, and avatar. It returns the standard SocialiteProviders OAuth2 User object, so the result fits the same patterns as other SocialiteProviders drivers. You can then map open_id or union_id to your local user-linking logic.
- Does socialiteproviders/tiktok support Laravel 11 and newer?
- The provided overview does not list a Laravel or PHP version matrix, so you should confirm compatibility in the package composer.json and README before adopting it. This matters especially for Laravel 11+ applications that register event listeners without an EventServiceProvider. The evaluation specifically flags verifying Laravel 11+ provider registration support.
- Is socialiteproviders/tiktok maintained and safe for production?
- It is community code rather than a first-party TikTok or Laravel SDK, with no guaranteed SLA, security disclosure process, or deprecation policy. The evaluation notes weak adoption signals: 15 stars, a last release of 2024-04-29, and a score of 0.435. It inherits some credibility from the SocialiteProviders organization, but individual drivers are often maintained on a best-effort basis, so treat it as a vendorable micro-dependency.
- Does the TikTok driver handle token refresh and token revocation?
- The overview describes the TikTok OAuth 2.0 flow and profile retrieval but does not document token refresh or revocation support. The technical evaluation explicitly flags this as an open question, so verify the driver source before relying on refresh behavior. Unless confirmed, treat it as handling the initial authorization code exchange rather than full token lifecycle management.
- Which TikTok scopes should I request for login?
- The package overview does not enumerate required TikTok scopes, so confirm them in the TikTok developer portal for your app. Basic profile access such as user.info.basic may be enough for login, while expanded scopes can require additional review or audit. Also check whether your TikTok app has passed audit or is limited to sandbox test users.
- How do I register the SocialiteWasCalled listener for TikTok?
- Add the TikTokExtendSocialite listener to the SocialiteWasCalled event so Socialite knows how to resolve the tiktok driver. In older Laravel versions this is typically done in EventServiceProvider, while Laravel 11+ applications need to confirm the correct event registration approach. Once registered and configured, Socialite::driver('tiktok') behaves like any other provider.
- Can I use socialiteproviders/tiktok outside Laravel, such as with Symfony or Slim?
- No, this package is native to Laravel and Socialite and is not framework-agnostic. It should not be evaluated for Symfony, Slim, or raw PHP services. In those cases, implementing the TikTok OAuth redirect and callback yourself is usually simpler than adopting the SocialiteProviders stack.
- What are alternatives to socialiteproviders/tiktok?
- The main alternatives are writing custom TikTok OAuth redirect and callback logic yourself or vendoring and maintaining the small driver code directly. The driver is a low-surface micro-package, so forking is trivial if upstream maintenance slows. There is no first-party TikTok or Laravel-official SDK backing described in the overview.