@oxyhq/core 15.0.0 → 15.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -139,6 +139,24 @@ export function OxyServicesDeviceBootMixin(Base) {
139
139
  * method would be dead code plus a second implementation of the failure
140
140
  * rules. The asymmetry is the design.
141
141
  *
142
+ * **Call this from NATIVE only.** There is no background worker on web to
143
+ * consume the credential, and handing a browser origin a long-lived
144
+ * non-rotating secret to persist is strictly weaker than the rotating device
145
+ * secret it already holds. The 404 degrade below is also native-shaped: a
146
+ * browser attaches `Origin`, which a server predating this route answers
147
+ * `403 BAD_ORIGIN` from its router-wide same-site guard rather than 404, so
148
+ * the quiet degrade would not fire there. A native client sends no `Origin`
149
+ * and gets the 404. Gate the caller by platform; do not widen the degrade to
150
+ * 403, which would also swallow a genuine origin misconfiguration.
151
+ *
152
+ * That paragraph is LOAD-BEARING, not belt-and-braces: the route sits above
153
+ * oxy-api's router-wide origin guard (deliberately, so a native client with
154
+ * no `Origin` is not rejected), so as of this writing NOTHING server-side
155
+ * refuses a browser caller that presents a valid bearer. Until a server-side
156
+ * check lands, caller discipline is the only control — which is also why a
157
+ * doc note cannot be the whole answer to browser XSS minting a long-lived
158
+ * credential with the victim's bearer.
159
+ *
142
160
  * @returns the provisioned credential, or `null` when the endpoint is absent
143
161
  * (404). The API deploy leads the SDK release, so a client on a newer SDK
144
162
  * than the server degrades to "no background session" quietly instead of