- How do I install Larascord in a Laravel app?
- Install it with Composer using composer require jakyeru/larascord, then publish the package config file and migrations. You need a Discord application with a client ID, client secret, and redirect URI, plus Laravel Socialite available in your app. After publishing, add your Discord credentials to the config or environment and set the callback route in your Discord app settings. The package registers its own service provider, so manual wiring is usually not required.
- Which Laravel versions does Larascord v8 support?
- Larascord v8.0.0 added Laravel 13 support, but the release notes do not state which older Laravel versions were dropped. Check the composer.json constraints in the v8 tag before adopting it, especially if you are on Laravel 11 or 12. If v8 does not support your version, pin to the latest v7 patch release instead.
- What changed in Larascord v8.0.0 and is it a breaking change?
- v8.0.0 is described as a redesign of the package architecture for compatibility with existing projects, and it is a major version bump. The release notes give only a pull request title, with no deprecation notices or upgrade guide, so semver convention says to assume breakage. Route registration, Socialite driver binding, and config resolution are the likely areas of change, but you must read the v7.0.0...v8.0.0 diff to know concretely.
- How do I upgrade Larascord from v7 to v8?
- There is no documented upgrade guide or migration command in the v8 release notes, so plan a manual upgrade. Pin your current v7 version in composer.json first, then read the full diff between the v7.0.0 and v8.0.0 tags, including README and config changes. On a spike branch, bump to v8, republish the config to a separate location, diff it against your published copy, and re-test the full Discord login flow before merging.
- Does Larascord modify my users table?
- Yes, Larascord publishes migrations that add Discord identity fields to your application's user table, linking a Discord account to a local user record. Because you control the users table, review the published migration before running it and check whether v8 changes the columns or requires a new migration on existing databases. The release notes do not document migration changes, so compare published migrations between versions.
- Can I restrict Discord login to members of a specific guild or role?
- Larascord includes optional guild membership and role-check gating as part of its Discord OAuth2 flow, which is one of the parts applications customize most. Configure the guild and role requirements in the published config file. Before upgrading, verify that v8 preserves these behaviours and their extension points, since the architecture redesign may have moved them.
- Does Larascord use Laravel Socialite and can I customize the scopes?
- Larascord is built as a Laravel-side wrapper around Discord OAuth2 and integrates with Laravel Socialite and your user model. The familiar Socialite flow applies, and the package adds configurable routes, scopes, and callbacks on top. Request only the scopes you need, such as identify and email, and re-check your published config after upgrading because config keys can change across major versions.
- What are alternatives to Larascord for Discord login in Laravel?
- You can use a community Socialite Discord driver directly and write your own controller, routes, and user linkage, which avoids a third-party wrapper but means maintaining the flow yourself. Other community packages wrap Discord OAuth2 similarly, so compare Laravel version constraints, maintenance activity, and whether they support guild or role gating. Larascord's value is the packaged config, routes, and user-model integration, not the OAuth2 protocol itself.
- Is Larascord safe to use on the authentication path in production?
- Authentication is blast-radius-critical, and Larascord is a single-maintainer project, so treat it as a dependency with real risk. Pin the exact version in composer.json, review diffs before upgrading, and keep a tested rollback path. Because a broken update can stop users from logging in, add an end-to-end test of the Discord callback before deploying version changes.
- How do I test the Discord login flow in Laravel?
- Use Laravel Socialite's fake support or mock the Socialite driver so tests do not hit Discord's servers. Cover first-time account linking, returning login, and any guild or role-gated routes. Run these tests against the exact package version you deploy, and re-run them on a spike branch before accepting a major upgrade.