Sexy Login
[resolved] issue with redirecting (11 posts)

  1. jason102178
    Posted 3 years ago #

    I was wondering if you could possibly help me figure out what could be the cause of this, you had helped me previously with my logout issue with the old version of sexy login...

    But since i have installed the newest version of sexy login i have not tested this part yet..

    When i login through the widget it shows my avatar like i want and it shows the dashboard and edit profile link and their pointing to the right location




    But for some reason when either of the buttons are clicked it doesnt take you to the admin or the edit profile, instead it takes you to the admin login screen and asks the user to login again.

    But once you login through the wordpress default admin screen if you go back to the widget and click on the dashboard or edit profile it will take you to the right place without having you login again...

    Its almost like the plugin is not communicating with wordpress some how to tell it that its already logged in.


  2. jason102178
    Posted 3 years ago #

    i also made sure i cleared my cookie and cache for my browser to make sure that couldnt be an issue.

  3. OptimalDevs
    Plugin Author

    Posted 3 years ago #

    Hello jason102178.

    If you are using SSL on administration page and you have changed the url redirect on login, probably, that's the problem.

    It's imposible access to a secure page (https) from a normal page (http) preserving the login token. That's the reason WordPress asks the user to login again in a HTTPS page.

    Sexy Login detects when force_ssl_admin is active and redirects to a HTTPS front page on login. In order that links work properly.

    Please let us know if this was the problem.

  4. jason102178
    Posted 3 years ago #

    Hi thanks for the reply, I am not sure w hat you meant by if i have changed the url of the login...

    I havent changed no url that i know of, on the old version of sexy login, i was having that logout issue with it not staying on the same page, so you had provided me with this code

    wp_logout_url( $_SERVER['REQUEST_URI'] )

    and that fixed the issue, then i upgraded to the new sexylogin , which deleted all the old files and when the new version was installed i did not have to make that edit within the plugin for the logout, it worked as expected...

    except when its having me login twice, my main part of my blog uses https also, so it doesnt have to go from http to https.

    so if it is a redirect issue how would i go about fixing or changing that.

  5. OptimalDevs
    Plugin Author

    Posted 3 years ago #

    Sorry, i meant if you have changed the url redirect from settings page of the plugin, not in the code. Please take a look at this section ( "Settings -> Sexy Login" ) and verify that it is set to "Default" the login redirection.

    You also need to check if when login with Sexy Login you are redirected to an HTTP or HTTPS page.

    And in last instance check the links of the buttons. Right click over them and copy the link. Are the links HTTP or HTTPS?

    Thank you very much for your feedback, we hope to solve these problems with SSL to launch a quick update.

    You really are helping to debug the plugin.

  6. jason102178
    Posted 3 years ago #

    oh ok i understand what you mean now, yeah the sexylogin is set to the defaults..

    for Login redirect to is set to current url
    and Logout redirect to is set to current url

    then here is an example of what the link looks like when i check the link buttons and copy them

    Dashboard link https://example.com/blog/wp-admin/
    profile link https://example.com/blog/wp-admin/profile.php

    Then when i acually click on the button it gives me this long address in the address bar


    which i didnt understand why it would do that since when i copy the link location it shows the correct link , and it looks like its wanting me to relogin because its changing it to https but my whole site is https so i am kind of lost as to why.

    If you would like i can provide a link to my blog

  7. OptimalDevs
    Plugin Author

    Posted 3 years ago #

    Ok, everything seems right.

    If you want, you can try a little fix ( while we find a final solution ). Edit the inc/ajax.php file, in line 47 you must change:

    $login = wp_signon($creds, $secure_cookie);


    $login = wp_signon($creds, true);

    Our tests are correct, so if you provide your blog link maybe we can detect the error.

    Once again, sorry about the SSL issues, but this will help to make a better plugin. So thank you very much!

  8. jason102178
    Posted 3 years ago #

    ok that seemed to fix the problem as far as i can tell, it took me right into my dashboard, do you still need the link to my site.

  9. OptimalDevs
    Plugin Author

    Posted 3 years ago #

    Now we know that may be failing, we will work on it.

    We don't need the link ;)

    Best regards.

  10. jason102178
    Posted 3 years ago #

    thanks for the help on fixing the issue, and i am glad to help so if any other person runs accross this issue

  11. jason102178
    Posted 3 years ago #

    Thank you for including a special thanks to me in the 2.2 release.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Sexy Login
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.