Closed EnergyFall closed 8 years ago
Have you tried anything? Any errors? Any code you can show?
I havent tried anything yet because i dont know where to put the code xD
The if($openid->validate())
function in steamauth.php line 32. I would put it after the steam session is created and before the redirect (around line 37)
How do i get the profile pic and name to show when they log in?
Look at the demo.php file for showing there icon. I wouldn't recommend saving it to a DB because it can consume a lot of space unless ur only using it temporarily
Also, here is another url on MySQL DB and php: http://www.w3schools.com/php/php_ref_mysqli.asp
There is nothing wrong with saving the URL of the avatar to the database.
@BlackCetha oh, i though he meant the entire image (face palm)
also, visit issue #86 I posted a entire thing about it on there and it may help
To get there image you could
Use there IP to link the image address to it In a DB and then when someone goes on ur website it checks to see if there IP was saved and if it was it gets the image and puts it where u need it, and if not it ask you to sign in and then gets all of the data
@bman46 saving the IP for authentication isn't good - better is to create a session or crypted cookie and use this. On most private PCs the IP get changed around midnight cause of a force disconnect of the provider. And the IP is the easiest thing to fake with a faked header, a proxy or just don't send it.
The best way would be to save the url in any table/columns related to the user model and if the authentication of the app was successfull then you can grab the url out of the DB.
good point @Gummibeer https://github.com/Gummibeer, but with Comcast and Verizon (I have had the both) it normally get changed when you unplug the router, and if it does not change for a week or so that is better then having to sign in every time you open your browser. But i could see this being a issue with network switches and stuff like that.
@bman46 For this reason you can use cookies or sessions with a defined lifetime (1day, 1 week, 1month, 1year, whatever you want) it's the same like "all" other sites (facebook, google, amazon, github, paypal ...) are doing it. With more or less other security parts but never by ip. Cause next day another one will have your IP he visit the site and is logged in with your account!? The IP-Address is good/ok for logging, geolocation and other not security related things.
Code example plz
setting up session data: http://php.net/manual/de/function.session-start.php setting up cookie data: http://php.net/manual/de/function.setcookie.php getting geo data by ip: http://maxmind.github.io/GeoIP2-php logging in php: https://github.com/Seldaek/monolog combining everything in an easy to use framework: https://laravel.com Any more open questions?
K Thq
Sent from my iPhone
On Mar 11, 2016, at 8:46 AM, Tom Witkowski notifications@github.com wrote:
setting up session data: http://php.net/manual/de/function.session-start.php setting up cookie data: http://php.net/manual/de/function.setcookie.php getting geo data by ip: http://maxmind.github.io/GeoIP2-php logging in php: https://github.com/Seldaek/monolog combining everything in an easy to use framework: https://laravel.com Any more open questions?
— Reply to this email directly or view it on GitHub.
Gonna close this now, don't really see the point in keeping this open.
K
I need some help to connect php with my database and upload info from the php to the database! I'm still learning :)