Comments (2)
By looking at the kinde.ts middleware source code, it seems kinde client is available at the event.context.
export default defineEventHandler(async (event) => {
const sessionManager = await createSessionManager(event)
const kindeContext = { sessionManager } as Record<string, unknown>
const kindeClient = getKindeClient()
for (const _key in kindeClient) {
const key = _key as keyof typeof kindeClient
// eslint-disable-next-line @typescript-eslint/no-explicit-any
kindeContext[key] = (kindeClient[key] as any).bind(kindeClient, sessionManager)
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
event.context.kinde = kindeContext as any
})
from kinde.
Hi @uyloal,
As @Keyvitia pointed out, the composable is not available on server side routes.
We expose the Kinde instance in event.context.kinde
everything is available there
from kinde.
Related Issues (20)
- [500] Authentication flow state not found in Safari HOT 1
- Error 500 when logging in: user must be a string. HOT 5
- Redirect URL/route for un-authenticated users HOT 4
- Can I use this module by logging in with my username and password? I didn't find any relevant documentation for this
- Protect Nuxt (Nitro) API routes HOT 2
- `useRuntimeConfig is not defined` HOT 4
- Error: Could not load HOT 3
- The package doesn't work with disabled SSR HOT 3
- useKindeClient incorrect type
- api callback in nuxt HOT 1
- useAuth in pinia store HOT 2
- Huge amount of rewriting during build HOT 2
- NUXT_KINDE_LOGOUT_REDIRECT_URL doesn't seem to be taken into account HOT 1
- Are the internal routes configurable
- Internal Server Error with /api/login and /api/register Links in Production HOT 1
- Setting an audience for authentication tokens HOT 1
- [ERROR] [nuxt] [request error] [unhandled] [500] Invalid URL string. HOT 1
- User information available on server HOT 1
- getUser is blowing up in server handler HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kinde.