aud = CLIENT_IDConfidential Worker BFF · Authorization Code + PKCE
Two tokens. Two audiences.
This app keeps tokens in D1 and gives the browser only an opaque session cookie. The receipt shows which audience is checked at each trust boundary.
aud = API_AUDIENCEThe sample requests openid profile email, so its session ends with the ten-minute access token. Add refresh-token rotation only when the application has a serialized, encrypted server-side refresh flow.