Slingui + Odoo
Language note: Media and interface labels remain in their original language. Portuguese labels are kept as displayed, with English explanations where useful.
Integration Guide
Section titled “Integration Guide”Educators’ lives and students’ experiences just became simpler. With the new integration between Slingui and Odoo, you no longer need to worry about multiple logins. By connecting your Slingui platform—with its AI tools for language lessons—to your Odoo system, you gain the power of Single Sign-On (SSO). This means your students and staff can access Odoo using the same Slingui account. Fewer passwords to remember, greater security, and a streamlined daily workflow.
To get started, download the integration files here: http://docs.slingui.com/downloads/cdn/auth_oidc.zip
Why Integrate Slingui with Odoo?
Section titled “Why Integrate Slingui with Odoo?”- Frictionless Experience: Users can move seamlessly between Slingui and Odoo without multiple logins.
- Simplified Authentication: One-click access to Odoo using Slingui credentials.
- Advanced Security: The integration follows the secure OpenID Connect standard.
- User Automation: New Slingui users are automatically created in Odoo with predefined permissions.
- Focus on What Matters: Less time on technical support and account management, more time to create quality lessons and content.
Essential Integration Requirements
Section titled “Essential Integration Requirements”Before you start, make sure you have the following:
- Supported Odoo Version: 16
- Slingui Credentials: Request your Client ID, Client Secret, and other authentication information from the Slingui sales team.
- Administrator Access: Administrator permissions in Odoo and access to the server where it is hosted.
Tip: If you prefer a hassle-free solution, you can host Odoo directly with Slingui, and the integration feature will already be available.
Step 1: Install the OpenID Connect Module in Odoo
Section titled “Step 1: Install the OpenID Connect Module in Odoo”- Download the Module: Link http://docs.slingui.com/downloads/cdn/auth_oidc.zip
- Transfer It to the Server: If you do not have direct server access, use an FTP/SFTP client such as FileZilla. Connect to the server and copy the ZIP contents to the
addons/directory of your Odoo installation. - Restart the Server: Restarting the Odoo service is essential for it to recognize the new module.
- Activate It in Odoo:
- Sign in to Odoo as an administrator.
- Go to Apps.
- Click “Atualizar Lista de Aplicativos” (Update Apps List).
- Search for “OpenID Connect” and click Instalar (Install).
Step 2: Configure the Slingui Authentication Provider
Section titled “Step 2: Configure the Slingui Authentication Provider”Now that the module is installed, connect it to Slingui.
- Enable OAuth: In Odoo, navigate to Configurações > Integrações > Autenticação OAuth (Settings > Integrations > OAuth Authentication) and enable the option. Save your changes. (Request your Client ID, Client Secret, and other authentication information from the Slingui sales team.)
- Create a New Provider:
- Go to Provedores OAuth (OAuth Providers).
- Click Criar (Create) and fill in the fields with Slingui’s information:
- Nome (Name):
Slingui - Fluxo (Flow):
OpenID Connect (authorization code flow) - Mapeamento de Token (Token Mapping):
sub:user_id email:email - Client ID: The ID provided by Slingui.
- Client Secret: The secret provided by Slingui. Select the Allowed checkbox.
- Rótulo do Botão (Button Label):
Slingui(this will be the text on the login button). - URL de Autorização (Authorization URL):
https://api.slingui.com/auth/oidc/auth - Escopo (Scope):
openid - URL de UserInfo (UserInfo URL):
https://api.slingui.com/auth/oidc/me - URL de Token (Token URL):
https://api.slingui.com/auth/oidc/token - URL de JWKS (JWKS URL):
https://api.slingui.com/auth/oidc/jwks - Endpoint de Dados (Data Endpoint):
https://api.slingui.com/auth/oidc/me
- Nome (Name):
- Save and Test: Save the settings. When you open the Odoo login page, you will see a new “Slingui” button. Click it to test the connection.
Step 3: Configure New User Registration
Section titled “Step 3: Configure New User Registration”For automation to work, you need to define how new users will be handled.
- Automatic Registration: In the authentication provider you created, enable the option for Odoo to automatically create a new user when it receives a Slingui login.
- Default Permissions: Define the permissions these new users will have by default in Odoo. For example, you can assign them to a specific student or customer group.
Pro Tip: You can go further and map Odoo groups to Slingui “roles” for even more granular, customized access control.
Optional Step: Login Automation
Section titled “Optional Step: Login Automation”For an even smoother experience, you can automate the login process so that the “Slingui” button is clicked automatically as soon as the Odoo login page loads.
To do this, you can add the following JavaScript script in Odoo:
window.addEventListener('load', function() { const oauthButton = document.querySelector('.o_login_auth a'); if (oauthButton) { oauthButton.click(); }});How to Include the Script in Odoo
Section titled “How to Include the Script in Odoo”- Access Developer Mode: In Odoo, enable “Modo de Desenvolvedor” (Developer Mode) by going to Configurações > Geral (Settings > General) and clicking “Ativar o modo de desenvolvedor” (Activate developer mode).
- Add the Script:
- Go to Configurações > Técnico > Visualizações (Settings > Technical > Views).
- Search for the
web.loginview. - In the XML code, add the JavaScript inside a
<script>tag at the end of the file, just before</t>. - Save your changes.
With this automation, the Odoo login page will automatically redirect to the Slingui authentication page, providing a one-click login experience.
Conclusion
Section titled “Conclusion”With Slingui and Odoo integrated, managing your language school becomes simpler and more efficient. You gain a unified authentication system and automated user management, freeing your time to focus on what really matters: delivering outstanding lessons.
If you need help with credentials or have questions, our team is ready to assist.
Teachers, what other integration would you like to see in Slingui to make your daily work even simpler?