Skip to content

loginbutton() Issue. #253

Description

@Flinty916

Hi.

I have been working with steamauth on localhost for a while. I recently moved it to a new domain, and with a new API key etc. However, now my login page does not work.

Details; Pressing the login button redirects to ?login however, does not redirect to the steam site to login.

Login page:
` <?php
if(!isset($_SESSION['steamid'])) {

            echo "welcome guest! please login<br><br>";
            loginbutton(); //login button

        }  else {
            include ('steamauth/userInfo.php');

            //Protected content
            echo "Welcome back " . $steamprofile['personaname'] . "</br>";
            echo "here is your avatar: </br>" . '<img src="'.$steamprofile['avatarfull'].'" title="" alt="" /><br>'; // Display their avatar!

            logoutbutton();
        }    
        ?>  `

I have changed nothing in the steamauth folder, minus adding my API key and URL etc:

`<?php
//Version 4.0
$steamauth['apikey'] = "#######"; // Your Steam WebAPI-Key found at https://steamcommunity.com/dev/apikey
$steamauth['domainname'] = "http://flintsdesigns.co.uk"; // The main URL of your website displayed in the login page
$steamauth['logoutpage'] = "Index.php"; // Page to redirect to after a successfull logout (from the directory the SteamAuth-folder is located in) - NO slash at the beginning!
$steamauth['loginpage'] = "Index.php"; // Page to redirect to after a successfull login (from the directory the SteamAuth-folder is located in) - NO slash at the beginning!

// System stuff
if (empty($steamauth['apikey'])) {die("

SteamAuth:
Please supply an API-Key!
Find this in steamauth/SteamConfig.php, Find the '$steamauth['apikey']' Array.
");}
if (empty($steamauth['domainname'])) {$steamauth['domainname'] = $_SERVER['SERVER_NAME'];}
if (empty($steamauth['logoutpage'])) {$steamauth['logoutpage'] = $_SERVER['PHP_SELF'];}
if (empty($steamauth['loginpage'])) {$steamauth['loginpage'] = $_SERVER['PHP_SELF'];}
?>
`
Any help appreciated

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions