Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix User.disclose_client never working correctly
Our test environment cheats by constructing a conn with a custom oauth_access/2 function. This assigns a :token to the conn but due to the way it is constructed it has the :user preloaded. When the OAuth Plug fetches a token it does not preload the user, so the check for user.disclose_client was always nil and assumed to be false. Preloading the :user ensures the test environment matches reality.
- Loading branch information