Understanding Salesforce OAuth Device Flow: Explanation and Demo (in English)
Updated 2026-11-07
What's changed since the video
Each change is dated and checked against Salesforce's own documentation.
- Only local external client apps. From November 30, 2026, the device flow works only with local external client apps with a localhost callback URL (Restrict the OAuth 2.0 Device Flow to Local External Client Apps, Winter '27 release notes, checked 2026-11-07). The demo's connected app setting is the old way.
- How long the codes last. The device code and the user code are each valid for 10 minutes (OAuth 2.0 Device Flow for IoT Integration, Salesforce Help, checked 2026-11-07).
- Connected apps: new ones need Salesforce Support. The video sets things up in a connected app. Since Spring '26, creating a connected app is turned off by default in new orgs and needs a request to Salesforce Support; the new way is an external client app (New Connected Apps Can No Longer Be Created in Spring '26, Salesforce Help, checked 2026-11-07). Existing connected apps keep working.
Still right
- The device starts it with only the client ID, not the secret; it gets a user code, a device code and the verification address, and polls.
- The person signs in on another screen and types the code; the device then gets its token, acting as that person.
- The device code stays with the device, so another device can't take its place.
All videos in this series: 身分與存取
只有在你點選時,影片才會從 YouTube 載入。