Skip to content

Plugin & Middleware are out of order #908

@Xenossolitarius

Description

@Xenossolitarius

🐛 The bug

Currently the issue is visible in the playground, seems that plugins and middleware's are in a race condition.
Not sure how this was not reported. This is pretty major and breaking bug where everything is misfiring. Changes to router behavior are to be expected although even middleware fires twice on landing. If i wasn't blocking UI until I had to add OIDC authentication I guess I wouldn't notice it too.

🛠️ To reproduce

https://stackblitz.com/edit/github-hn98fch1-serjiw7u?file=plugins%2Fhello.ts,middleware%2Fauth.global.ts

🌈 Expected behaviour

Plugins run before middleware, middleware waits for plugin

ℹ️ Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions