User Experience

A JavaScript-based Contacts picker for selecting users to invite to a Photo Viewer application is a great example use case for the Implicit Grant flow. It is a valuable activity for both the user and the application developer, it doesn’t happen regularly, and the user is always responsible for choosing which users to invite from his or her contacts.

The user experience is identical to the Server-Side Web Application flow described in Chapter 2:

  1. Photo Viewer application lets the user know that it needs access to her Contacts.

  2. The OAuth authorization server used by the Contact app’s API prompts the user to grant permission for the Photo Viewer application to read her contacts.

  3. After the user has approved, she is redirected back to the Photo Viewer application, which now has access to her contacts.

Get Getting Started with OAuth 2.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.