We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Front end member login

How Do I?

anthonyc62's avatar
anthonyc62
1 posts
4 years ago
anthonyc62's avatar anthonyc62

I have created a login form to enable a member to login but the result gives me a ‘form expired’ error. I am developing on a local system (MacBook Pro/MAMP)

Is there something simple I have missed?

Anthony Adelaide/Australia

{exp:member:login_form return="member/index"}
                <div class="form-group row">
                    <label for="uname" class="col-sm-2 col-form-label">Username</label>
                    <div class="col-sm-10">
                      <input type="text" class="form-control" id="uname">
                    </div>
                  </div>
                  <div class="form-group row">
                    <label for="pword" class="col-sm-2 col-form-label">Password</label>
                    <div class="col-sm-10">
                      <input type="password" class="form-control" id="pword">
                    </div>
                  </div>


                  <div class="form-group row">
                    <div class="col-sm-10 offset-sm-2">
                      <button type="submit" class="btn btn-primary">Log in</button>
                    </div>
                  </div>
            {/exp:member:login_form}
       
Rob Allen's avatar
Rob Allen
3,105 posts
4 years ago
Rob Allen's avatar Rob Allen

Are you caching the form? If you are the CRSF token may not be updated until the cache is cleared.

I’ve found the same symptoms on occasion, even when forms are not cached, clearing my browser history & cookies usually fixes it. I’ve not found the exact cause but it does point to cookies getting out of sync.

       
vw000's avatar
vw000
482 posts
4 years ago
vw000's avatar vw000

That seems like a CRSF token problem. Like Rob said, make sure you care not catching that login page.

       
Robin Sowell's avatar
Robin Sowell
13,255 posts
4 years ago
Robin Sowell's avatar Robin Sowell

Could be losing post via a rewrite as well- if you lose the post, generally secure form is the first thing to fail.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.