Skip to content

feat: Default authentication in Villus context #5

@kingkong404

Description

@kingkong404

While the full login service is developed, I would appreciate it if we could have a basic auth setup for Villus based on default creds. Run the below function and then set context in Villus. Although I'm struggling to set the context after getting the token.

logaretm/villus#71

    async function logInto() {
      const logData = await useMutation(LoginDocument).execute({
        email: 'admin@example.com',
        password: 'changeme',
      });
   // Code to set context on Villus client for future requests. 
    }

    logInto();

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