diadal/vue-social-auth

Pop-up always redirect to login page in iPhone

gabmaxs opened this issue · 7 comments

I have a PWA application with Vue and Laravel and social login with facebook or google providers. When clicked in the button to login, the popup open a application's login page, not provider page, and when clicked again only application's login page are load in loop.

This only happens in iPhone dispositives, i had tested in windows browser, Mac browser and Android browser and it works correcty.

This is a gif from problem record when a try to debug in iPhone simulator:

gif-1o1

working can you share your Vue code also did you create Vue route

in main.js:
image

in router.js:
I use the IonicVueRouter instead of VueRouter
image

and i added this code to block some pages unless user has logged in
image

Needs anything else?

disable Auth check for now and try I mean comment out router.beforeEach then try see if you get social login page

did some tests and it works, have any idea why?? haha
and any suggestions to do Auth check with another way?

you checking Auth before login process completed change your method.

mine


router.beforeResolve((to, from, next) => {

  if (to.matched.some(record => record.meta.middlewareAuth)) {                
        if (!AuthData.check()) {
            next('/login');

            return;
        }
    }
 }
})

also try get the correct route path login process need to pass Auth check

thats worked, thank you so much for helping