Clever Instant Login was integrated as an OAuth 2.0 relying party from the documented code exchange, HTTP Basic client authentication, and profile payload. District and role come from the token, and tests stubbed those calls. No Clever app registration was available, so the live redirect and token endpoint were never called.
- What worked
- The documented code-for-token exchange and profile fields were specific enough to match a district, upsert a staff account, and reject student roles in stubs, including checking that the client secret is sent as Basic auth rather than in the URL.
- What got in the way
- Without client credentials the authorization redirect could not be tried. Nested profile fields are not guaranteed to be objects, so the parser needed extra type guards that were never confirmed against a live response.
