为什么angular4调用两次oauth/token?
Why angular4 calls two times oauth/token?
我遇到了问题,但没看出是什么导致了这个问题。我制作了一个 laravel+passport 项目,并尝试将其他 angular4 项目与 "talk" 和 laravel 项目一起使用。这是start angular4 project. But am stack. AS you can see in picture below when I click login it calls two times oauth/token to laravel project. Firstable time he have Request method: Options
, and second one is OK and have Request method: POST
. First one didn't return nothing and the other one return valid results with token and reset token. I don't see where is that first one triggered but second one is triggered after finished first request. Code where is placed click on login button is here。
希望有人能告诉我是什么问题。
第一个请求选项是 CORS 的一部分。这个是正常的。如果您需要更多详细信息,请参阅此页面:https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS
我遇到了问题,但没看出是什么导致了这个问题。我制作了一个 laravel+passport 项目,并尝试将其他 angular4 项目与 "talk" 和 laravel 项目一起使用。这是start angular4 project. But am stack. AS you can see in picture below Request method: Options
, and second one is OK and have Request method: POST
. First one didn't return nothing and the other one return valid results with token and reset token. I don't see where is that first one triggered but second one is triggered after finished first request. Code where is placed click on login button is here。
希望有人能告诉我是什么问题。
第一个请求选项是 CORS 的一部分。这个是正常的。如果您需要更多详细信息,请参阅此页面:https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS