Skip to content

Pass an instance provider rather than the better auth instance. #79

Description

@xKrvZ

I'm currently working on a project where the better auth instance can change on the fly. I'd like the ability to be able to pass in a better-auth instance provider instead of the better-auth instance itself. I've looked at the code and I've pulled it into my personal repo and modified it to work this way, it did take some doing but I got it to work in the end.

Hooks were fine to keep as they are since they are application level code anyway, but it's the plugins and config variables I wanted to change on the fly.

For reference, I added the ability to provide a method for returning a better auth instance here and modified some of the code elsewhere to handle this change.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions