PHPackages                             refact-be/odoo-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. refact-be/odoo-bundle

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

refact-be/odoo-bundle
=====================

Symfony Bundle to use Odoo as authentication provider

0.1.0(6y ago)071PHPPHP ^7.0

Since Jul 13Pushed 6y ago1 watchersCompare

[ Source](https://github.com/refact-be/odoo-bundle)[ Packagist](https://packagist.org/packages/refact-be/odoo-bundle)[ RSS](/packages/refact-be-odoo-bundle/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

Odoo bundle
===========

[](#odoo-bundle)

The Symfony bundle ships with two authentication mechanisms you can use to authenticate users from an Odoo instance

Installation:
-------------

[](#installation)

```
composer require refact-be/odoo-bundle

```

Add the bundles to bundles.php:

```
Refact\OdooBundle\OdooBundle::class => ['all' => true]

```

Create a configuration file for the Odoo bundle (config/packages/odoo.yaml)

```
odoo:
    url: http://localhost:8069
    database: database_name
    admin_id: 2
    admin_pass: admin

    # required only for the sso mechanism
    sso_secret: supersecret

    #role_mapping:
    #    1: ROLE_USER_TYPES_INTERNAL_USER
    #    9: ROLE_USER_TYPES_PORTAL

```

The role\_mapping config is optional but allows deep integration of the Odoo Groups and Symfony Roles

Use the odoo:get-roles command to dump the role\_mapping automatically:

```
bin/console odoo:get-roles

```

Read data from Odoo:

```
/**
 * @Route("/me", name="me_details")
 * @IsGranted("ROLE_USER_TYPES_PORTAL")
 */
public function users(Odoo $odoo, TokenStorageInterface $tokenStorage)
{
    $token = $tokenStorage->getToken();

    dump($token);

    dd($odoo->rpc('object', 'execute_kw', ['res.users', 'search_read', [[['login', '=', $token->getUser()]]]])[0]);
}

```

Odoo Form Login
---------------

[](#odoo-form-login)

This form extends the traditional Symfony Form Login which allows most of its options to be reused

config/packages/security.yaml

```
security:
    firewalls:
        main:
            anonymous: true

            form_login_odoo:
                #login_path: login

            logout:
                path: logout

    role_hierarchy:
        # allow internal users to access pages restricted to portal users
        ROLE_USER_TYPES_INTERNAL_USER: ROLE_USER_TYPES_PORTAL

```

controller:

```
/**
 * @Route("/login", name="login")
 * @Route("/login_check", name="login_check")
 * @Route("/logout", name="logout")
 */
public function login(AuthenticationUtils $authenticationUtils)
{
    return $this->render('app/login.html.twig', [
        'username' => $authenticationUtils->getLastUsername(),
        'error' => $authenticationUtils->getLastAuthenticationError(),
    ]);
}

```

templates/app/login.html.twig

```
{% if error %}
    {{ error.messageKey }}
{% endif %}

    Log in

```

Odoo Single Sign-On (SSO)
-------------------------

[](#odoo-single-sign-on-sso)

If users are already logged in in Odoo, it might be a bad user experience to repeat the credentials in the Symfony application. SSO allows bridging the two applications to share authentication information.

This mechanism requires to install and configure the SSO addon in your Odoo instance. See  for additional details

config/packages/security.yaml

```
security:
    firewalls:
        main:
            anonymous: true

            sso_odoo:

            logout:
                path: logout

```

config/routes.yaml

```
login:
    path: /login
login_check:
    path: /login_check
logout:
    path: /logout

```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2544d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/543477cef404854fa2127a396dd56bed6c36c363a03155a543722336dff9d096?d=identicon)[guillaumesmo](/maintainers/guillaumesmo)

---

Top Contributors

[![guillaumesmo](https://avatars.githubusercontent.com/u/1309544?v=4)](https://github.com/guillaumesmo "guillaumesmo (1 commits)")

---

Tags

odoossosso-authenticationsymfonysymfony-bundle

### Embed Badge

![Health badge](/badges/refact-be-odoo-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/refact-be-odoo-bundle/health.svg)](https://phpackages.com/packages/refact-be-odoo-bundle)
```

###  Alternatives

[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[kimai/kimai

Kimai - Time Tracking

4.8k8.7k1](/packages/kimai-kimai)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

101466.4k45](/packages/friendsoftypo3-content-blocks)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9417.2k59](/packages/open-dxp-opendxp)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1615.6k12](/packages/2lenet-crudit-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
