by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Martijn Bakker
    @mbakker96
    Beau Simensen
    @simensen
    @mbakker96 this line is literally doing nothing: https://gist.github.com/mbakker96/491ee0320cb8de90b9be#file-login-php-L37
    it creates a cookie but you don't assign it to anything so it isn't doing anything
    @mbakker96 these lines are similar; you are assinging to $setCookie but you're not doing anything with $setCookie https://gist.github.com/mbakker96/491ee0320cb8de90b9be#file-login-php-L39-L41
    Martijn Bakker
    @mbakker96
    The first one i forgot to delete
    And thought that i used the $setCookie in the middleware
    Beau Simensen
    @simensen
    @mbakker96 you need to do something with that $setCookie for it to be meaningful. you need to get $setCookies from the response, and then add that new $setCookie to $setCookies. Then render $setcookies into a response.
    Beau Simensen
    @simensen
    @mbakker96 right, but you're not doing anything to $setCookies here: https://gist.github.com/mbakker96/491ee0320cb8de90b9be#file-cookie-php-L36-L46
    you just extract it from the response and then render it back into the response without making any changes.
    that code has no way to know about the $setCookie somewhere else in your code.
    Martijn Bakker
    @mbakker96
    Btw Thankyou so much for helping me out ;)
    so what do I've to do?
    Beau Simensen
    @simensen
    @mbakker96 sure thing, but i don't have a lot more time i can help with. i'm under a lot of pressure on a work project.
    Martijn Bakker
    @mbakker96
    Can you give me a direction to the right way?
    Beau Simensen
    @simensen
    @mbakker96 you can drop the middleware and do this: https://gist.github.com/simensen/b316e8facd40114391b8#file-login-php-L38-L45
    @mbakker96 Inside modify's callback you are always passed a set cookie. if the set cookie already existed (probably not in your case) it will already have a value. either way, by setting the value here it will override what already existed as the value for auth.remember.
    Beau Simensen
    @simensen
    i've gotta go now. i hope that works for you, though. :)
    you can write more in here but not sure when i'll be able to jmp back.
    Martijn Bakker
    @mbakker96
    I works
    Yeah just take your time
    It is now for work or school or anything is just for private learning
    Beau Simensen
    @simensen
    It works now? :)
    Martijn Bakker
    @mbakker96
    it*
    it works
    Dflydev\FigCookies\Cookie Object
    (
    [name:Dflydev\FigCookies\Cookie:private] => user_rem
    [value:Dflydev\FigCookies\Cookie:private] => x27sRlj1BFCC3ErdxI65Bdee9zKgLXfmleNXnHvUzPo02cVpQ40V5Mg6ucaE0T6/0zAk8OuFLC6dl/pe8yXcJq2M98S0BEzHEWBdgT3O5+EblW7cO5fw0cfP8W9Zy+Hr_+GBFKUR5uunLEOgcRqGxnJ7vy2+MX2fLxcIxxUYeOKVRDAH6bu04w1MsoOn5Uqb4wpEppTV8knYQwMPVXf19G5ZFHqueCmRXQAWTk/oL6jh/+KhKCK598sKUX9q1I1Lt
    )
    Beau Simensen
    @simensen
    cool. :)
    Martijn Bakker
    @mbakker96
    and delete? if you have tie
    time
    Beau Simensen
    @simensen
    I think you already had the delete stuff working.
    actually, no
    no, yeah, that is right. :) you're removing it bothf rom the request and the response so that is good.
    Martijn Bakker
    @mbakker96
    Good to hear
    Good luck with your work ;)
    Martijn Bakker
    @mbakker96
    delete not working
    I think same problem as before
    Martijn Bakker
    @mbakker96
    I updated by logout code but it still not works
    btw just take your time :+1:
    Beau Simensen
    @simensen
    @mbakker96 try to do a print_r on $response after $this->FigResponseCookies->remove($response, $this->config->get('auth.remember')); and see what it is setting for your cookie value/expire time (if anything at all).
    @mbakker96 might need to print_r($response->getHeaders()) or whatever is appropriate there to see what headers are there, then you can see what the Set-Cookie header is doing.
    Martijn Bakker
    @mbakker96
    Array ( [Content-Type] => Array ( [0] => text/html; charset=UTF-8 ) )
    Beau Simensen
    @simensen
    @mbakker96 i think maybe remove is not the best thing to do in this case. remove for request is fine, but for response, rather than remove, you might want to modify it to set the set-cookie expires time into the past.
    $response = $this->FigResponseCookies->modify($response, $this->config->get('auth.remember'), function (SetCookie $setCookie) { return $setCookie->withExpires(some time far in the past); });
    Martijn Bakker
    @mbakker96
    @simensen tx it works
    Beau Simensen
    @simensen
    @mbakker96 ^5
    Martijn Bakker
    @mbakker96
    ^5
    Raj Patel
    @rajp1847
    hi\
    Raj Patel
    @rajp1847
    https://codepen.io/rajp1847/pen/BZgoKw?editors=1000
    if you hover on buy a house and the first thing
    it is mixed
    price and map
    but in sell a house it isnt