@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.
@@ -144,6 +144,24 @@ function OxyServicesDeviceBootMixin(Base) {
144
144
  * method would be dead code plus a second implementation of the failure
145
145
  * rules. The asymmetry is the design.
146
146
  *
147
+ * **Call this from NATIVE only.** There is no background worker on web to
148
+ * consume the credential, and handing a browser origin a long-lived
149
+ * non-rotating secret to persist is strictly weaker than the rotating device
150
+ * secret it already holds. The 404 degrade below is also native-shaped: a
151
+ * browser attaches `Origin`, which a server predating this route answers
152
+ * `403 BAD_ORIGIN` from its router-wide same-site guard rather than 404, so
153
+ * the quiet degrade would not fire there. A native client sends no `Origin`
154
+ * and gets the 404. Gate the caller by platform; do not widen the degrade to
155
+ * 403, which would also swallow a genuine origin misconfiguration.
156
+ *
157
+ * That paragraph is LOAD-BEARING, not belt-and-braces: the route sits above
158
+ * oxy-api's router-wide origin guard (deliberately, so a native client with
159
+ * no `Origin` is not rejected), so as of this writing NOTHING server-side
160
+ * refuses a browser caller that presents a valid bearer. Until a server-side
161
+ * check lands, caller discipline is the only control — which is also why a
162
+ * doc note cannot be the whole answer to browser XSS minting a long-lived
163
+ * credential with the victim's bearer.
164
+ *
147
165
  * @returns the provisioned credential, or `null` when the endpoint is absent
148
166
  * (404). The API deploy leads the SDK release, so a client on a newer SDK
149
167
  * than the server degrades to "no background session" quietly instead of