Demo server for Websanova apps and plugins.
websanova / laravel-api-demo Goto Github PK
View Code? Open in Web Editor NEWLaravel API for Demos
Laravel API for Demos
Demo server for Websanova apps and plugins.
In AuthController.php
, you have a couple of functions that need explaining, such as how they work behind the scenes, what they do, and where from the vue-auth
package are they actually called upon?
Hey @websanova,
Why do we return this at all if oauth2
function already generates the url and makes the redirect without even touching the backend? Can we just check if the the code exists, parse the socialite user etc.
For ex.:
if (!$request->has('code')) {
return response(['ErrorParsingAuthCode' => 'No callback code found'], 400);
}
$user = $this->userService->findOrCreate(
$this->socialite->driver($provider)->stateless()->user()
);
if (!empty($user)) {
if (!$token = JWTAuth::fromUser($user)) {
throw new AuthorizationException;
}
return response([
'msg' => 'Successfully logged in via ' . $provider . '.'
])->header('Authorization', $token);
}
return response(['ErrorGettingSocialUser' => 'There was an error getting the ' . $provider . ' user.'], 400);
Any plans upgrading to Laravel 5.5?
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.