hipsterjazzbo / LaraParse

LaraParse provides a nice integration for using Parse (parse.com) with Laravel 5+
MIT License
27 stars 19 forks source link

Improve session storage #19

Closed hipsterjazzbo closed 9 years ago

hipsterjazzbo commented 9 years ago

This will need to be tested to make sure that:

danjordan commented 9 years ago

The default parse implementation stores all of it's session data as an array with a storageKey. I think it would be a good idea to do that here as well, otherwise you could be clearing all session data, when you actually only want to clear the parse session.

I can make a pull request if it helps?

nicklee1990 commented 9 years ago

good point, pull request welcome!

On a related note, I did notice the other day that calling Auth::logout() was not unsetting the ParseUser when I do ParseUser::getCurrentUser. I have to explicitly call ParseUser::logout() in my Auth Controller which isn't ideal - need to have a look at this as well

danjordan commented 9 years ago

I've actually written a different implementation of your UserProvider which returns an Illuminate\Auth\GenericUser instead of the ParseUser object. So far it seems to work with Facebook login/logout and normal credentials login/logout. I'll try to make a pull request for that as well.

nicklee1990 commented 9 years ago

Tested and is working fine

nicklee1990 commented 9 years ago

@danjordan did you get a chance to create a PR for your version of the UserProvider? It'd be good to see some sample code to see how you've done it

danjordan commented 9 years ago

Nah, I've been on holiday and I've stopped working on the project that required it :(

I'll see if I can have a look into it over the next few days and whack a pull request up next week.