Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: why does sign in omit the session information? #162

Open
dominicbarnes opened this issue Nov 13, 2017 · 2 comments
Open

Question: why does sign in omit the session information? #162

dominicbarnes opened this issue Nov 13, 2017 · 2 comments

Comments

@dominicbarnes
Copy link

dominicbarnes commented Nov 13, 2017

Currently, the sign in method explicitly omits session on the resolved account object. I did not expect this behavior, as I was storing a single account reference and using the presence of session to determine if the user was "logged in" or not. (session is present after account.get(), but not account.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?

@gr2m
Copy link
Member

gr2m commented Nov 14, 2017

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

@dominicbarnes
Copy link
Author

@gr2m yeah, that's exactly what I ended up doing :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants