Skip to content

Cannot navigate to /protected when logging in as user in store #1

Open
@seanodotcom

Description

@seanodotcom

First, thanks for the code & the article -- it's a great, simple intro to the Svelte auth workflow!

When running this repo, however, I cannot navigate to /protected when I login as a user saved in the Svelte store (export const user = writable[{ id: 123, email: '[email protected]', password: 'secret'}]).

Debugging \store\db.js, in getUserById, I can see the id passed as '123', but after find(), existingUser is null.

But when creating a new user via "Sign Up", navigation is permitted as expected. getUserById finds, and returns, the UUID properly.

I tried creating new (hard-coded) users in the store with different ids, and get the same issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions