Skip to content

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

Description

@polus-arcticus

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions