Other Auth Providers¶
In addition to Microsoft Entra ID (SSO), xlwings Server supports various authentication providers, including custom ones, which are described here.
Custom authentication¶
Config: To use your own authentication method, activate the
customauthentication provider:XLWINGS_AUTH_PROVIDERS=["custom"]
Server: To make this work on the backend, you need to implement the
validate_tokenfunction underapp/auth/custom/__init__.py.Integration: On the frontend, you need to provide the token depending on your integration:
Office.js add-ins: Adjust
globalThis.getAuthunderapp/static/auth.jsso that it returns thetokenandproviderthat you will validate with thevalidate_tokenfunction on the backend. For example, to use thecustomprovider, you’d do:globalThis.getAuth = async function () { return { token: "...", provider: "custom", }; };
Other integrations: provide the token via the
authconfig, see your specific integration for more details: VBA, Google Apps Script, or Office Scripts.
Google OAuth2 (SSO)¶
TODO