I have problems with cookie storage. I use passport and have no problems logging in using the standard recipe, but when I reload the page I lose the login. No cookies are stored with the $LoopBackSDK prefix. If I set up the SDKBrowserModule with StorageBrowser the data is stored in local storage and preserved on reload. Not sure if this is a bug or just me missing something obvious. I use version 2.1.0 of the SDK builder and angular 4.4.3. The app is built with the option ng2web.
What type of issue are you creating?
What version of this module are you using?
Write other if any: 2.1.0
Please add a description for your issue:
I have problems with cookie storage. I use passport and have no problems logging in using the standard recipe, but when I reload the page I lose the login. No cookies are stored with the
$LoopBackSDK
prefix. If I set up theSDKBrowserModule
withStorageBrowser
the data is stored in local storage and preserved on reload. Not sure if this is a bug or just me missing something obvious. I use version 2.1.0 of the SDK builder and angular 4.4.3. The app is built with the optionng2web
.I tried printing window.document.cookie before and after line 51 in cookie.browser.ts (https://github.com/mean-expert-official/loopback-sdk-builder/blob/master/lib/angular2/shared/storage/cookie.browser.ts#L51) and it doesn't change after it is set (and it looks strange to me that it should be set this way, but I haven't worked directly with cookies before, so not sure what to expect).
(originally posted in #198)