An update to the user authentication method enables dfx to use the browser’s localStorage for the user’s public and private keys if cookies are not enabled.
So, I tried to disable cookies in my browser in order to let dfx behaves the same as in the tutorial.
Here we are, I tried this approach in Firefox, Google Chrome, and Microsoft Edge with these outcomes:
Firefox:
– cookies enabled: dfinity-ic-user-identity stored in “Cookies”
– cookies disabled:
An error happened:
e.exports<[4]
Google Chrome and Microsoft Edge:
– cookies enabled: dfinity-ic-user-identity stored in “IndexedDB” > “localforage - http://localhost:8000” > “keyvaluepairs”
– cookies disabled:
I was able to reproduce the example in Chrome. It looks like Chrome is throwing the following errors:
DOMException: The user denied permission to access the database.
DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document
That leads me to think that none of the methods that we would use to store the key pairs are accessible if the browser’s cookies are disabled. I found this StackOverflow post describing what is probably happening:
For now, the behaviour is browser-dependent. Disabling cookies on each of these browsers disable the following:
Thanks for the ping about the identity storage/cookies issue. I missed the post that described the issue in the Inter-canister calls tutorial. It worked at one point in time (honest!). Sorry that was broken for you. I’ve removed that section for the next deployment of the documentation.
And thanks for catching that the path to the linkedup repo was also out of date. There’s a lot to keep track of, so I really do appreciate the community’s help!