Ha! Yeah I hear you. Every time I load up a regex library I feel like there ought to be a better way... luckily I'm at least semi-proficient at writing a regular expression, but don't ask me to make sense of one after a week's time LOL
There is a helpful video: Enabling Google SSO for your NodeBB forum - YouTube, which is good, although I needed additional steps, basically Google Admin.
Just in case it's useful for some people, using Google Apps accounts, after installing nodebb-plugin-sso-google, activating it, and reloading, I needed to go -with the admin account- to Google Admin:
https://admin.google.com > More controls > Apps > Additional Google services > Settings for specific organizational units > example.com > Page 2 > Google Developers Console > On
Then to Google APIs:
Click on Google APIs
View All > Social > Google+ API > Enable > Create
Project name: Example Login
Project ID: example-login
Create > Enable > Create credentials
Which API are you using?: Google+ API
Where will you be calling the API from?: Web server (e.g. node.js, Tomcat)
What data will you be accessing?. (x) User data
What credentials do I need?
Create an OAuth 2.0 client ID
Name: Web client 1
Authorized redirect URIs: https://example.com/community/auth/google/callback
Create client ID
Set up the OAuth 2.0 consent screen
Email address: firstname.lastname@example.org
Product name shown to users: Example Login
More customization options
Homepage URL: https://example.com
Product logo URL: https://example.com/content/images/logo-120x120.png
Continue > Download credentials > Download > Done
Web client 1
Client ID: (...)
Client secret: (...)
Creation date: (...)
And finally to the NodeBB plugin:
NodeBB Admin > Social Authentication > Google
Enter Client ID, Secret
[yes] Skip email verification for people who register using SSO?
Tested, it works well.
@julian No error, I added some logging in to test when things fired, so can confirm that it does, and it refreshes any non playing videos already in the topic as expected (when you click play it remove the class that the script looks for to stop playing videos reloading), but the new one isn't loaded. Unless they're both happening at exactly the same time. I may have a play with the delay timer, to see how far down I can go until it stops loading.
Currently set to 500ms.