mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-08-20 10:08:02 +02:00
Set up Store, Service & Routing to handle the sign in process
This commit is contained in:
12
resources/js_vue3/router/middlewarePipeline.js
vendored
Normal file
12
resources/js_vue3/router/middlewarePipeline.js
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
export default function middlewarePipeline(context, middleware, index) {
|
||||
const nextMiddleware = middleware[index];
|
||||
if (!nextMiddleware) {
|
||||
return context.next;
|
||||
}
|
||||
return () => {
|
||||
nextMiddleware({
|
||||
...context,
|
||||
next: middlewarePipeline(context, middleware, index + 1),
|
||||
});
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user