I want a .php file thats only reachable after a twitch login. I used this instruction Github Authentication and it’s working till step 2. now i’ve no idea what to do next…
And if someone know how to, ich want a automatic teamspeak 3 verification which is connected to the twitch account.
jea and i stuck at step 2, i’ll get redirect to the url but the question is what i’ve to do in the .php file to make it only accessible if your logged in (right now you can always reach it)
so i’f im right i got the same result like mine, but what’s to do that the redirect_uri is just visible if a user is logged in. just like https://www.twitch.tv/settings/connections if ur not logged in into twitch. you know.
Everyone goes to “redirect_url” on the “redirect_url” page the user is shown logged out content, they click the link, which then goes to Twitch, they login and authorise the app, and are sent back to the “redirect_url” page with the code.
If there is a code you verify the code and if you get a user packet as in my code, then you are logged in…
It’s a simple if statement…
If $gotUserName then logged in, and thus show logged in content. else show the login button and/or an error message
I got back the the redirect_url and i got the code in the adress bar, but i dont know how to create a page thats only visible if your logged in (or a profile system). i want a system like bibabot.net