Implementing Vue.js 2.0 and Laravel 5.3 with CORS problem solution - part 2

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

I followed your tutorial step by step but when accessing user object I am getting 401 unauthenticated error I watched your tutorial twice and I am pretty sure there's no step skipped can you help, please? I think your tutorial is a bit old (since 2016) may be any update? I watched your another video in which you added refresh token. Is that necessary? Please help me!!!

udev
Автор

This particular one helped me a lot. Thanks man!

Mike-cgcd
Автор

Great video, and btw, which theme/colorscheme are you using? And which packages do you use in your sublime to work with laravel?

infmaticagames
Автор

I followed step by step but am still getting a CORS error when requesting the token from Vue.


i have the domain in Cors.php and my code matches what you have. It was working when i used api/test in the last video. Any ideas?

TimFarmer-zvlh
Автор

Hi, how to access the client project as virtual host(like client.vuejs-tutorial.dev) instead of http:localhost: 8080. Please help me

Nageswararao
Автор

i got error, when i open localhost:9000/oauth/token i got this "The GET method is not supported for this route. Supported methods: POST"

blaxkbell
Автор

HI, it is awesome video, but i confused when i open my browser network i found user service call twice, the first time OPTIONS without any headers and the second time is GET with my token header, why service call twice ?

osamamohsen
Автор

Hello, I just started watching your Vue videos. Good job, by the way!

Let me ask you this: do I need to go through all these configurations every time I create a new application?

jonecir
Автор

how to deplpy this app shall I use two hosts one for the laravel api and other for the vuejs front end

aeid
Автор

I had trouble, when access http:localhost/oauth/token successfully, but http:localhost/api/user in case of error Unauthorized 401, what's the solution? thaks!

adykurniawan
Автор

It's a good practice to use Nginx's proxy_pass to solve the cors problem.

陈兵-qq
Автор

I am unable to get request for api user. it shows unauthorized.

shahrozeali
Автор

I have this error. I have been trying to solve this but no solution.

andysonutomudo
Автор

Thanks ! ;) very good tutorial !
spend hours with this f**** Cors just because a bad php.ini config, after setup it right that solve the issue.
For those who are on windows and wamp be sure to setup php.ini with this 2 parameters :

// uncomment this lines below in php.ini
always_populate_raw_post_data = -1
enable_post_data_reading = Off

MacFly
Автор

I had a problem is i can't install laravel/passport.

Using version ^2.0 for laravel/passport
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Conclusion: remove laravel/framework v5.3.29
- Conclusion: don't install laravel/framework v5.3.29
- laravel/passport v2.0.0 requires illuminate/support ~5.4 -> satisfiable by illuminate/support[v5.4.0, v5.4.9].
- laravel/passport v2.0.1 requires illuminate/support ~5.4 -> satisfiable by illuminate/support[v5.4.0, v5.4.9].
- laravel/passport v2.0.2 requires illuminate/support ~5.4 -> satisfiable by illuminate/support[v5.4.0, v5.4.9].
- laravel/passport v2.0.3 requires illuminate/support ~5.4 -> satisfiable by illuminate/support[v5.4.0, v5.4.9].
- don't install illuminate/support v5.4.0|don't install laravel/framework v5.3.29
- don't install illuminate/support v5.4.9|don't install laravel/framework v5.3.29
- Installation request for laravel/framework (locked at v5.3.29, required as 5.3.*) -> satisfiable by laravel/framework[v5.3.29].
- Installation request for laravel/passport ^2.0 -> satisfiable by laravel/passport[v2.0.0, v2.0.1, v2.0.2, v2.0.3].

Installation failed, reverting ./composer.json to its original content.

jsadmin
Автор

I'm using Laravel 5.4 and I'm having this error when using the post method:


I don't know if someone else has this problem.

advent
Автор

do anyone knows if it's possible to use ldap with laravel passport?

JavierOrellanaRivas
Автор

Hey! Thanks for the video! I'm struggling a bit tho - maybe you or someone on here can help me:
I'm using laravel 5.4 and followed your tutorial.
Now these lines are causing some trouble:

'Authorization': 'Bearer ' + response.body.access_token
}
.then(response => {
console.log(response)
})
})

I only get this response:

Uncaught (in promise) TypeError: Cannot read property 'access_token' of undefined

Does anybody know if something changed in passport or something?
Thx in advance :)

zerawk
Автор

php artisan route:list
[ErrorException]

muhammadawais
Автор

I am doing the same with small difference that I am implementing custom user provider.
Please help.

draganmijatovic