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

Persisting a user-owned space over page reload in a web client #1573

Open
polus-arcticus opened this issue Nov 2, 2024 · 0 comments
Open

Comments

@polus-arcticus
Copy link

https://github.com/storacha/w3up/tree/main/packages/w3up-client#user-owned

Hi, I've been workign through a user owned workflow and its working great. Ive been doing

    const prin = Signer.parse(privateKey)
    const sto = new StoreMemory()
    const cli = await Client.create({principal: prin, store: sto})
    const acc = await cli.login(email)
    await acc.plan.wait()
    const spa = await cli.createSpace(`user-space`, {account: acc})
    console.log(spa)
    localStorage.setItem('w3up', JSON.stringify({privateKey, email}))

however, I am finding that I need to re authorize my email every time.
I'm wondering if there is a way to persist the session?
thanks!

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

1 participant