mirror of
https://github.com/nestriness/nestri.git
synced 2026-11-26 17:09:52 +02:00
Starting a device grant takes no secret and costs the caller nothing, so one address could create grants as fast as it liked: rows nobody will ever answer, and a wider target for anyone guessing user codes. Guesses were already limited per address; asking was not. POST /device/authorize now allows 10 requests per address per 10 minutes by default (`deviceVerification.requestLimit` and `requestWindow`), counted the same way as wrong user codes. Past that it answers 429 with `Retry-After` and an OAuth error body using `slow_down`, the code a device client already treats as "wait".