Skip to content

This tool simplifies the OAuth2 flow for Stellantis services by dynamically loading configurations and providing a user-friendly interface.

License

Notifications You must be signed in to change notification settings

benbox69/stellantis-oauth-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

stellantis-oauth-helper

A simple Python GUI tool to assist with the OAuth2 authorization flow for Stellantis services (MyPeugeot, MyCitroën, MyDS, MyOpel and MyVauxhall).

This tool dynamically fetches the latest configuration from the Home Assistant Stellantis integration, and allows users to easily retrieve the OAuth2 authorization code without manual browser inspection.

✨ Features

  • ✅ Automatically downloads the latest Stellantis brand/country configurations
  • ✅ Supports multiple brands and locales
  • ✅ Simple UI for selecting brand and country
  • ✅ Embedded browser for authentication
  • ✅ Automatically intercepts redirect and extracts the OAuth2 code
  • ✅ One-click copy of the authorization code

⚙️ Prerequisites

  • Python 3.7 or higher
  • Required Python packages:
pip install PyQt5 PyQtWebEngine

🚀 How to Use

1. Clone the Repository

git clone https://github.com/benbox69/stellantis-oauth-helper.git
cd stellantis-oauth-helper

2. Run the Application

python oauth_helper.py

🖥️ Application Flow

  1. The application automatically downloads the configs.json file used by the Home Assistant Stellantis integration.
  2. A graphical window opens where you select your brand (e.g., MyPeugeot) and country.
  3. Click Continue to launch the embedded browser.
  4. Log in using your Stellantis account.
  5. Once redirected, the application will:
    • Intercept the redirect,
    • Extract the OAuth2 code,
    • Display the code in a popup window with a Copy button.

📦 Next Steps

Once you have the code, you can:

  • Use it with the Home Assistant Stellantis integration
  • Or exchange it manually for an access_token / refresh_token via Stellantis token endpoint (not yet included in this tool — coming soon)

🛠️ Roadmap

  • Exchange of code for access_token and refresh_token
  • Option to save tokens to file
  • Optional CLI/headless mode

📄 License

MIT License

About

This tool simplifies the OAuth2 flow for Stellantis services by dynamically loading configurations and providing a user-friendly interface.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages