Follow-up to #260, which provides the hosted-widget delivery foundation. This issue adds authentication behavior after #260 lands; it does not change the delivery work in #260.
Once the server is configured with Google, Apple, and email-OTP providers, the hosted widget supports these credential paths:
- Host-configured agent key or parent key
If the embedding page supplies an agnt_key-... agent key or ozw_... parent key, retain the existing direct-key flow. Do not show a login modal.
- OIDC sign-in when the page supplies no key
If no host key is configured, opening the widget presents sign-in with Google, Apple, or email OTP. Successful sign-in authorizes that user to use the chat for the current authenticated session. This issue does not add chat-history or memory persistence.
- User-provided key
The same modal offers entry of the user’s own agent key or parent key. A key can be used for the current session without saving. Remembering it in the browser is an explicit opt-in, with a warning that browser-stored credentials are appropriate only on a trusted personal device. Provide a clear “forget key / sign out” control.
This is additive: it supplies a fallback only for keyless embeds and does not remove, alter, or prompt over the existing host-configured key flows. Model-selection and agent model-locking behavior are out of scope and will be tracked separately.
Follow-up to #260, which provides the hosted-widget delivery foundation. This issue adds authentication behavior after #260 lands; it does not change the delivery work in #260.
Once the server is configured with Google, Apple, and email-OTP providers, the hosted widget supports these credential paths:
If the embedding page supplies an
agnt_key-...agent key orozw_...parent key, retain the existing direct-key flow. Do not show a login modal.If no host key is configured, opening the widget presents sign-in with Google, Apple, or email OTP. Successful sign-in authorizes that user to use the chat for the current authenticated session. This issue does not add chat-history or memory persistence.
The same modal offers entry of the user’s own agent key or parent key. A key can be used for the current session without saving. Remembering it in the browser is an explicit opt-in, with a warning that browser-stored credentials are appropriate only on a trusted personal device. Provide a clear “forget key / sign out” control.
This is additive: it supplies a fallback only for keyless embeds and does not remove, alter, or prompt over the existing host-configured key flows. Model-selection and agent model-locking behavior are out of scope and will be tracked separately.