Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Login Not Always Working

Started by Muut Archive 10 years ago · 1 replies · 330 views
10 years ago

My logins don't always work. I have the plugin installed, sometimes it works fine, but sometimes when I login with a test user account I created nothing happens. I login in, I get the redirected to the successful login page, but I'm not actually logged in. I'm using the antimatter theme and I added

TWIG
{% if config.plugins.login.enabled and grav.user.username %}
    <li><i class="fa fa-lock"></i> {% include 'partials/login-status.html.twig' %}</li>
{% else %}

to my navigation.html.twig, so when I login, I will see "welcome username" in the navi bar menu. I also added

TWIG
{% if config.plugins.login.enabled and grav.user.username %}
   <a class="muut" href="https://muut.com/i/mymutt">Real-time discussions right on your site</a>
   <script src="//cdn.muut.com/1/moot.min.js"></script>
{% else %}
   <p>You must be <a href="{{ base_url }}/login" target="_blank">logged in</a> to view the forums</p>
{% endif %}

to a page I created for a forum. Only users who are logged in can see it. I can tell I'm not logged because neither of these things works. And if I visit /log in I have to login yet again, and yet again nothing happens. As far as I know, these are the only two things I've used the login plugin for. Has anyone else had this problem? Everything of mine is updated on grav. Why would logins not be working? Something to do with cookies?

10 years ago

Check you're using Grav 1.1 which comes with the latest Login plugin, and check if you can replicate it there too.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1368 9 years ago
Archive · by Muut Archive, 9 years ago
2 942 9 years ago
Archive · by Muut Archive, 9 years ago
2 4069 9 years ago
Archive · by Muut Archive, 9 years ago
1 2960 9 years ago
Archive · by Muut Archive, 9 years ago
3 1125 9 years ago