Shopinvader Api Signin JWT

Beta License: AGPL-3 shopinvader/odoo-shopinvader

This addon adds a web API to signin into the application and create a partner if the email in the jwt payload is unknown.

This addon supports the “anonymous partner” feature, which allows to create carts for user that are not loggedin. When you login from an anonymous partner, your cart is transfered to your real partner, and your anonymous partner is deleted.

Table of contents

Installation

To enable anonymous carts, you’ll need the module shopinvader_fastapi_auth_jwt. And use it’s dependency auth_jwt_authenticated_or_anonymous_partner_autocreate when mounting your cart router, such as:

cart_app = FastAPI()
cart_app.include_router(cart_router)
cart_app.dependency_overrides.update(
    {
        authenticated_partner_impl: auth_jwt_authenticated_or_anonymous_partner_autocreate,
    }
)

Example of a full implementation with jwt signin and anonymous carts can be found in the demo module shopinvader_v2_app_demo.

Known issues / Roadmap

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • ACSONE SA/NV

Maintainers

This module is part of the shopinvader/odoo-shopinvader project on GitHub.

You are welcome to contribute.