diadal / vue-social-auth

Laravel Vue (SPA) Social Auth
75 stars 27 forks source link

Pop-up always redirect to login page in iPhone #20

Closed gabmaxs closed 4 years ago

gabmaxs commented 4 years ago

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

diadal commented 4 years ago

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

gabmaxs commented 4 years ago

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?

diadal commented 4 years ago

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

gabmaxs commented 4 years ago

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

diadal commented 4 years ago

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;
        }
    }
 }
})
diadal commented 4 years ago

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

gabmaxs commented 4 years ago

thats worked, thank you so much for helping