Hello,
IMO the script actually work, the popup close/refresh your website, and you’re logged.
Do you have any way on your website to verify if you’re logged in?
Try this code, instead of the button:
<?php
if ( !is_user_logged_in() ) {
echo '<a href="'.wpsap_button_login_url().'">Login</a>';
}else{
echo '<a href="'.wpsap_button_logout_url().'">Logout</a>';
}
?>
If the “Login” link appear, click it, and when the page refresh, logout button should show up. This means you are actually logged.
Regards.
Thread Starter
Mihael
(@mihael)
Thank you for your reply.
I did the way you’re suggesting. It doesn’t seem to work as expected:
After signing in with Steam, it doesn’t redirect.
Here’s the link to test it (“steam-login” parameter is required):
http://steamavatars.co/?steam-login=1
Here’s how the plugins settings are set
http://steamavatars.co/wp-content/uploads/Screen-Shot-2016-11-29-at-19.17.22.png
Thank you very much for helping me!
Mihael
-
This reply was modified 8 years, 5 months ago by
Mihael.
Hello,
Okay so, as expect the plugin actually work:
1. When you go to http://steamavatars.co/?steam-login=1 note it will automatically add a hashtag at the end (#.WD3Lklz4RBk).
2. When I click on login, and sign in Steam, it will close popup but not reload the page.
3. If I reload the page manually, the logout button appear, which means I’m logged in.
4. If I click on that logout link, it will redirect me to the initial page http://steamavatars.co/?steam-login=1 (But without the end hashtag!)
5. If I reclick the login button & sign in Steam again, it will close the popup AND correctly refresh the page.
Problem: Related to that hashtag your website is adding to the url. As the plugin is using <meta http-equiv="refresh" />
(which doesn’t work well with hastags).
Suggestions:
A: Wait for a fix from me (will try to do it soon). I’ll use javascript <script>window.location.href = ' . $wpsapConfig['domainName'] . '";</script>
in wp-steam-auth.php
line 203
.
B: Remove that weird hashtag your website is adding.
UPDATED Working Fix for “Suggestion A”:
Wait for a fix from me (will try to do it soon). I’ll use javascript window.location.reload(true)
in /js/wp-steam-auth.min.js
instead of window.location.href=window.location.href
NOTE: If you want to use “popup method” with custom link like in the code I suggested you to use earlier, remember to set id="wpsapButtonPopup"
on the <a></a>
markup 😉
Example:
<?php
if ( !is_user_logged_in() ) {
echo '<a href="'.wpsap_button_login_url().'" id="wpsapButtonPopup">Login</a>';
}else{
echo '<a href="'.wpsap_button_logout_url().'">Logout</a>';
}
?>
Thread Starter
Mihael
(@mihael)
OK, thank you for noticing this.
I can’t figure out which plugin is adding this hashtag, so I need to investigate it a bit further (I purchased the website recently from a third party).
No hurry with the update, but it will be very much appreciated to support this, especially if this hashtag needs to remain.
Thank you!
Hey,
I just published a hotfix patch 0.6.3, it should appear pretty soon in your WordPress and will be working fine with your website 😉
Also, I added a note on my previous answer concerning cutom url links and how to enable popup on it, please read it!
Thanks for the report.
Have a good day!
And BTW, if you like the plugin please give it rate over here: https://wordpress.org/support/plugin/wp-steam-auth/reviews/ 🙂
Regards.
Thread Starter
Mihael
(@mihael)
I updated the plugin and it now works great. Thank you very very much.