mirror of
https://github.com/bitinflow/nuxt-oauth.git
synced 2026-03-13 13:45:59 +00:00
Merge pull request #1 from bitinflow/envoyr-patch-1
Allow directory slash for login callback url
This commit is contained in:
@@ -74,7 +74,7 @@ export default defineNuxtPlugin(() => {
|
||||
addRouteMiddleware('auth', async (to) => {
|
||||
const {user, authConfig, setBearerToken, setRefreshToken} = await useAuth()
|
||||
|
||||
if (to.path === authConfig.redirect.callback) {
|
||||
if (to.path === authConfig.redirect.callback || to.path === authConfig.redirect.callback + '/') {
|
||||
const queryParams = new URLSearchParams(to.query.toString());
|
||||
if (queryParams.has('error')) {
|
||||
return navigateTo(authConfig.redirect.login)
|
||||
|
||||
Reference in New Issue
Block a user