Phonegap Authorisation Error On Callback

So I have gone about this in the new way you suggested and followed the tutorial here.

Annoyingly, I have still been unable to get it to work. I have installed SafariViewController and can confirm that is working.

However, when I compile all the files (using Webpack) I get an error:

App.js:139 Uncaught TypeError: Cannot read property ‘content’ of null

Are you able to help? I have updated the relevant files on the same GitHub link.

As before, any guidance greatly appreciated.