Open dominicbarnes opened 6 years ago
hey @dominicbarnes it’s been a while I’ll have to look up the reason, but I agree it’s confusing at first sight. I think it was to make it coherent with .signUp()
and .signOut()
, but maybe there was something else.
You can do a hoodie.account.get('session')
after the sign in
@gr2m yeah, that's exactly what I ended up doing :)
Currently, the sign in method explicitly omits
session
on the resolved account object. I did not expect this behavior, as I was storing a singleaccount
reference and using the presence ofsession
to determine if the user was "logged in" or not. (session
is present afteraccount.get()
, but notaccount.signIn()
)What is the main reason for this behavior? In my case, I want the session information after signing in, as I've just opened a new session. However, I'm very new to hoodie, so it's totally possible I'm misusing it right now.
In short, can/should sign in return the session information?