arlac77/svelte-session-manager

Question:Login component like view layer example?

Closed this issue · 4 comments

I understand correctly — Login.svelte component like view layer example?

In 'tests/app/src/App.svelte' You can see

the session creation

export const session = new Session(localStorage);

and the use of a form to refresh (login) the session:

<Login {session} endpoint="/api/login" {result}>
</Login>

Yep! & I can make my form instead Login?

Simply call

await login(session, endpoint, username, password);

from your form

Ok. Thx 😊