Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Anstating55's avatar

Question about an axios request

In my application I have got laravel as backend, jwt-auth as authentication, socialite as oauth2 provider and vue as my frontend.

Now I use axios to authorize the user by github for example (https://github.com/login/oauth/authorize) inside the client and then get the access token by the backend api. Now I getting cors errors. Is it wrong to request the authorization from the client side. I read something that the browser blocks the request for security reasons.

I wonder how packages like https://github.com/dgrubelic/vue-authenticate perform the authorization client side

0 likes
1 reply

Please or to participate in this conversation.