Monthly Archives: May 2017

iOS Networking with Swift: Strongly Discouraged, but it Works!

At first it appears that the authentication flow has been significantly changed away from the flow presented in Lesson 5: Authentication Requests, because basically it has. Instead of entering in your TMDb credentials (username and password) into the app (where presumably the app could surreptitiously co-opt them), TMDb wants app developers to let TMDb authenticate users directly through their (TMDb’s) website. You can do this using a segue to an authentication view controller with a web view and a web view delegate, but that is not as spiffy as handling login in your own login view.

But while implementing this new flow, I stumbled across the following URL request:


It is listed as strongly discouraged, but by golly that is the request that this course is looking to use in the loginWithToken() method, and it still works! I might go back and finish the new authentication flow, since I actually have it fully implemented, but for now I’m sticking with old school. If you want to go old school too, here is the link to the appropriate documentation:

Also, the instructor’s notes in step 18 of Lesson 5 include example code on how to use validate-request-token.