Skip to content

Potentially error #238

Description

@sulimenko

in the session recovery example, potential error

application/api/auth.2/restore.js

({
  access: 'public',
  method: async ({ token }) => {
    const restored = context.client.restoreSession(token);
    if (restored) return { status: 'logged' };
    const data = await api.auth.provider.readSession(token);
    return { status: data ? 'logged' : 'not logged' };
  },
});

If the token is not in sessions, we check it in the database, but after that we don't add it to sessions.

Example: context.client.startSession(token, data);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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