https://supertokens.com/ logo
creating multiple instances of supertokens
m

maheedhar

03/30/2023, 3:25 PM
Can't I create two instances of supertoken in my main file with two different credentials
r

rp

03/30/2023, 3:56 PM
hey @maheedhar if you want to do supertokens.init twice in the backend with different cores, that's not possible. What's the use case?
m

maheedhar

03/31/2023, 8:29 AM
I am trying to have two auth systems, one for our Admin APIs and other one for user APIs. Just wanted to separate auth for both sets entirely.
r

rp

03/31/2023, 8:30 AM
right. At the moment, the only way to do this is to have two different backends, until we release the multi tenancy feature and then you can do it with a common backend.
m

maheedhar

03/31/2023, 8:31 AM
Yes, we shall do that, we will host our application separately for Admin and users separately.
But just wanted to know, why can't we initialise two supertokens controllers. Is it using any global variables
r

rp

03/31/2023, 9:05 AM
yea. It's a singleton object