Git Product home page Git Product logo

Comments (3)

mst101 avatar mst101 commented on May 26, 2024 1

Thank you. It's more understandable now that you've updated the example. Maybe you could include the migration as part of your package?

A couple of other minor tweaks:

  1. The loginFacebook method should have an arrow, not a colon:
    return response()->json(["error" => $e->getMessage() ]);

  2. The issueToken method needs to accept the $request parameter.

I still need to get my head round all this, but it looks promising...

from laravel-passport-socialite.

anandsiddharth avatar anandsiddharth commented on May 26, 2024

If you are asking SocialAccount which is in the example it's a laravel model i.e. database table. from where I am querying if the user id exists with a certain 3rd party oauth provider i.e. facebook.
It's clearly understandable from the example since it has where methods called.
Hope this answers your question.

Peace,
Anand Siddharth

from laravel-passport-socialite.

anandsiddharth avatar anandsiddharth commented on May 26, 2024

Hi, thanks for pointing out the mistakes in readme! I have updated it.

The reason why I haven't added the migration (i.e. social_accounts table) to the package is, the developer should have the flexibility to choose what to store and what not to from 3rd party provider. to facilitate that their's an interface Anand\Laravel\PassportSocialite\User\UserSocialAccount provided which must be implemented on user model and then a function findForPassportSocialite is added to it which returns the user object using the provided input i.e. provider and id, if it satisfies the developer's conditions or else null to the package and then package generates or refuses the request to generate access token.

Peace,
Anand Siddharth

from laravel-passport-socialite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.