A reference design for enabling an iOS app to authenticate with an OAuth2 server