Weave Code
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

Oauth Bundle Laravel Package

hwi/oauth-bundle

Symfony bundle for OAuth1.0a/OAuth2 login and user authentication. Supports Symfony 6.4–8.0 (PHP 8.3+) and integrates dozens of providers (Google, GitHub, Facebook, Apple, LinkedIn, Azure, Keycloak, etc.).

View on GitHub
Deep Wiki
Context7

Step 1: Setting up the bundle

A) Add HWIOAuthBundle to your project

composer require hwi/oauth-bundle

If you use a recent version of Symfony supporting Symfony Flex, when prompted, accept to execute the recipes coming from the contrib repository. You'll see an error at the end of the process, it's intended. Continue straight to the second step: configuring resource owners (Facebook, GitHub, Google, Windows Live and others to fix it.

If you use an old version of Symfony, follow the instructions provided in the next sections.

B) Enable the bundle

Enable the bundle in the kernel:

// src/Kernel.php

public function registerBundles()
{
    $bundles = [
        // ...
        new HWI\Bundle\OAuthBundle\HWIOAuthBundle(),
    ];
}

C) Import the routing

Import the redirect.php and login.php routing files in your own routing file.

# config/routing.yaml
hwi_oauth_redirect:
    resource: "[@HWIOAuthBundle](https://github.com/HWIOAuthBundle)/Resources/config/routing/redirect.php"
    prefix:   /connect

hwi_oauth_connect:
    resource: "[@HWIOAuthBundle](https://github.com/HWIOAuthBundle)/Resources/config/routing/connect.php"
    prefix:   /connect

hwi_oauth_login:
    resource: "[@HWIOAuthBundle](https://github.com/HWIOAuthBundle)/Resources/config/routing/login.php"
    prefix:   /login

Note:

To prevent strange issues, this route should be imported before your custom ones.

Continue to the next step!

When you're done. Continue by configuring the resource owners you want to use in your application!

Step 2: Configuring resource owners (Facebook, GitHub, Google, Windows Live and others

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.
babenkoivan/elastic-client
innmind/static-analysis
innmind/coding-standard
datacore/hub-sdk
alengo/sulu-http-cache-bundle
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
imbo/imbo-coding-standard
visualbuilder/filament-lottie
servicioslineaonce/starter-kit
atomcoder/laravel-reorderable
irajul/filament-shadcn-theme
agtp/agtp-php
agtp/mod-php
centraldesktop/protobuf-php