Closed swapnilnandgave closed 3 years ago
How do you verify that it is not using the correct connection?
I had verified through below steps
mysql
Which is localhostmssql4
which is remote server DBctx.auth.use
for api4
then throwing connect ECONNREFUSED 127.0.0.1:8889
Below is exact code snippet which is used. user record is getting from mssql4 connection using Database.connection('mssql4')
const token = await ctx.auth.use('api4').generate(user, {
expiresIn: '30days'
})
Please share a repo to help reproduce the issue, as it works fine for me.
Can you share your mail ID so I can share project directly to you?
I am looking for a simplified version that can help me reproduce the error. Going through your complete project is not possible for me
I know you are busy but It would be great help for me
Closing since not actionable
Package version
node ace --version App version: 1.0.0 Framework version: 5.1.6 Assembler version: 5.1.1
Node.js and npm version
node - v14.15.4 npm - v6.14.10
Sample Code (to reproduce the issue)
I have added new guard with connection
mssql4
but it is taking default env connection instead of mentioned connection defined in guard listWhen I try to generate api token using api4 then it is connecting to default env db connection
ctx.auth.use('api4').generate
. I have attached below code snippet to better understand.auth.ts
auth.ts in contract
In interface ProvidersList
In interface GuardsList
api4: { implementation: OATGuardContract<'dbuser', 'api'>, config: OATGuardConfig<'dbuser'>, },