Use Twitch as 'lock' to personal website, possible?

They’re meant to be examples, not necessarily plug-and-play implementations. OAuth 2.0 and OIDC, which have simplified documentation as part of our authentication docs, are standard in the industry. You should have no trouble finding a library that does the one you need for PHP7. Implementing the flow you need yourself is not a huge task either, but you need to understand how it works.