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

  1. Config: To use your own authentication method, activate the custom authentication provider:

    XLWINGS_AUTH_PROVIDERS=["custom"]
    
  2. Server: To make this work on the backend, you need to implement the validate_token function under app/auth/custom/__init__.py.

  3. Integration: On the frontend, you need to provide the token depending on your integration:

    • Office.js add-ins: Adjust globalThis.getAuth under app/static/auth.js so that it returns the token and provider that you will validate with the validate_token function on the backend. For example, to use the custom provider, you’d do:

      globalThis.getAuth = async function () {
        return {
           token: "...",
           provider: "custom",
        };
      };
      
    • Other integrations: provide the token via the auth config, see your specific integration for more details: VBA, Google Apps Script, or Office Scripts.

Google OAuth2 (SSO)

TODO