We have written a tutorial series in which we try to give you a broad understanding on how to implement the OAuth2 authorization code flow with an iOS app, a Vapor API and Hydra as the OAuth2 server.
This repository contains the code for the Vapor backend that gets implemented in Part 2 and Part 3 of the tutorial series.