mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-12-04 06:05:29 +01:00
11 lines
327 B
JavaScript
Vendored
11 lines
327 B
JavaScript
Vendored
/**
|
|
* Prevents the view to be reached by users authenticated throught an auth proxy
|
|
*/
|
|
export default async function skipIfAuthProxy({ to, next, nextMiddleware, stores }) {
|
|
const { appSettings } = stores
|
|
|
|
if (appSettings.$2fauth.config.proxyAuth) {
|
|
next({ name: 'accounts' })
|
|
}
|
|
else nextMiddleware()
|
|
} |