How do I implement an OAuth2 flow in my UI?

Is this logging in of the first oauth account, what would explain my issue posted here? What are people doing in order to use the API Connector for api calls, not social login?