Hello, currently writing an app where I did a lot of authentication myself.
It works fine, but it’s decently buggy after several attempted fixes so I’m migrating it to authentication using the SDK.
Docs look clear, implementation looks straight-forward, but wondering about a few things.
-
Is the client a shared singleton? If I create the client in one file and use it in another, do I get access to the same instance of the client? Is a context required?
-
I use middleware right now to determine if someone is authenticated (based on a cookie) and then if they aren’t I redirect them to log in. Is there a way to do this with the Directus SDK?
-
I re-log someone in automatically using the refresh token in cookies. Is this supported?
Thanks!