Manage Account separatly
I would like to manage the "known" accouts separatly.
I mean:
- When I choose to start a client, if the account isn't known by the authentication cache, I would like it to throw an error.
- I would like an API to manually add accounts to the cache and retrieve the list of the accounts that are stored in the cache.
It may already be possible with the API but I didn't find how to do it... Also the second point is already possible, there is no real need for my first point.
Thank you in advance :)
-
After the user authenticates, the "session" event is emitted which you can use to check against whatever use case you have and do any needed handling there.
-
This is not possible as prismarine-auth manages its own cache internally and it's by design not supposed to be modified by outside code, so the library can safely manage it on its own. If you need your own semantics you must implement your own caching function as defined in the prismarine-auth docs.
Alright.
So if I implement external auth managment, what are the options that I must provide to the createClient function to be logged in ?
I assume that I need to provide the accessToken but is there other things ?