Skip to content

wip introduce add-in endpoints and views#1008

Draft
lebaudantoine wants to merge 8 commits intomainfrom
add-in-authentication
Draft

wip introduce add-in endpoints and views#1008
lebaudantoine wants to merge 8 commits intomainfrom
add-in-authentication

Conversation

@lebaudantoine
Copy link
Copy Markdown
Collaborator

@lebaudantoine lebaudantoine commented Feb 23, 2026

How it works?

sequenceDiagram
    actor Client
    participant Addon as meet.com/addons
    participant TES as Token Exchange Service
    participant Cache
    participant OIDC as OIDC Provider

    Client->>Addon: POST /addons/sessions
    Addon->>TES: Generate session ID
    TES->>Cache: Init cache[session_id] = null
    TES-->>Addon: session_id
    Addon-->>Client: { session_id }
    Client->>Client: Store session_id

    loop Long Polling
        Client->>Addon: GET /addons/sessions/:session_id
        Addon->>Cache: Read cache[session_id]
        Cache-->>Addon: null (not ready)
        Addon-->>Client: 202 Pending
    end

    Client->>Client: Open dialog → meet.com/addons/transit/?session_id=xx

    Client->>Addon: GET /addons/transit/?session_id=xx
    Addon->>Addon: Store session_id in session/state
    Addon-->>Client: Redirect to OIDC /authorize?redirect_uri=/addons/redirect

   Client->>OIDC: Authenticate
    OIDC-->>Client: Redirect to meet.com/callback?code=xx

    Client->>Addon: GET /callback?code=xx
    Addon->>OIDC: Exchange code for tokens
    OIDC-->>Addon: id_token, access_token
    Addon-->>Client: Redirect to /addons/redirect

    Client->>Addon: GET /addons/redirect
    Addon->>Addon: Forge JWT (access_token)
    Addon->>Cache: Set cache[session_id] = access_token
    Addon-->>Client: Redirect to success page

    Note over Client,Cache: Cache now populated — long poll resolves

    Client->>Addon: GET /addons/sessions/:session_id
    Addon->>Cache: Read cache[session_id]
    Cache-->>Addon: access_token
    Addon-->>Client: 200 { access_token }
    Client->>Client: Store access_token

    Client->>Addon: API Request (Authorization: Bearer access_token)
    Addon-->>Client: Protected resource response
Loading

Base automatically changed from refactoring-backend to main February 24, 2026 15:08
Comment thread src/frontend/default.conf
Comment on lines +14 to +18
location ~ ^/outlook-addin(/.*)?$ {
alias /usr/share/nginx/html/outlook-addin$1;
add_header Access-Control-Allow-Origin "*";
add_header Cache-Control "no-cache, no-store, must-revalidate";
}
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wip to be added conditionally

Comment thread src/backend/core/addons/service.py
Comment thread src/backend/core/addons/viewsets.py Outdated
Comment thread src/backend/core/addons/service.py
Comment thread src/backend/core/external_api/authentication.py
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 2, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
2 Security Hotspots
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant