What youre linking is a sso extension for WordPress. You could use the code for inspiration, but it wouldn't do what you want.
To be honest, it looks like youre looking to undertake somewhat of a challenging task. I would recommend that you start by researching and thoroughly understanding all the systems involved (oauth, web view, SSO, etc), or hiring a developer with experience in what you are trying to achieve.