I believe it's silly question but how to use node-oidc-provider with express? So I got access_token on the client side, sent request with Bearer {access_token}
and what's next? How can I obtain user from that token? I believe oidc-provider must have some middleware or anything which can be used for that but I didn't find any documentation on that topic. The only thing I found is how to check if user is logged in:
const ctx = provider.app.createContext(req, res)
const session = await provider.Session.get(ctx)
const signedIn = !!session.account
But it doesn't work for me and it looks like it's using cookies inside by some reason so session is null in that case.