I have followed below link to provide Login With LinkedIn
in my laravel app.
https://itsolutionstuff.com/post/laravel-5-login-with-linkedin-using-socialite-packageexample.html
All Working fine , I am successfully able to login with likedin .
But problem is when user first time click button Login With Linked on my website , it redirect to linkedIn Page show Dialog with Ok and Cancle button and now if user click on cancle button then its shows below error
browser url is :
I want when user click on cancle button , it simply redirect to home page of my website .
On LinkedIn Developer Console I have added below url :
OAuth 2.0
Authorized Redirect URLs:
http://www.mywebsite.com/auth/linkedin/callback
OAuth 1.0a
Default "Accept" Redirect URL:
http://www.mywebsite.com/auth/linkedin
Default "Cancel" Redirect URL:
http://www.mywebsite.com/
please help me to solve out this issue.
You should try this:
In Contoller method withch is called for http://www.mywebsite.com/auth/linkedin/callback
if($request->has('error')){
return redirect()
->to('admin/login')
->withErrors("Access Denied");
}