mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-12-11 09:40:43 +01:00
11 lines
327 B
JavaScript
11 lines
327 B
JavaScript
|
/**
|
||
|
* 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()
|
||
|
}
|