dgrubelic / vue-authenticate

Simple Vue.js authentication library
1.43k stars 250 forks source link

Any Access Token You Return From Any Response Is Being Intercepted and is Replacing Your Authenticated Token!!! #89

Open codeitlikemiley opened 6 years ago

codeitlikemiley commented 6 years ago

I wonder Why the access_token from a data object is being intercepted EVEN IF you are not using the vue authenticate url such as login, logout, register, providers method for authenticating a user....

I have a Laravel App That Uses Passport, Ive use this package to authenticate on front end...

I also Use Laravel Socialite To get Access Token oi The User Third Party Account And Save that Access Token For my App To Consume (NOTE. IM not using laravel socialite for my login and register )

I have an App The Handles the Provider Call back by Vue , then send a axios call with the response the Server of Social Sites to my server ... Then i Process that call back...

I have been modifying socialiate a lot that i think i have a bug on the server side...

But i found out that When i return a JSON RESPONSE with data object that has a key of access_token

It is being intercepted and replaces the Laravel Passport Token i Provided during the user login...

Please Fix this Issue , You should only be intercepting URLs define in your config and not all URLS you are consuming in your App

dgrubelic commented 6 years ago

This is fairly simple to fix, I'll push it as soon as I can. Thanks for reporting this.

dgrubelic commented 6 years ago

Fix for this issue is currently in beta release. You can install it with npm i vue-authenticate@beta.