Answer the question
In order to leave comments, you need to log in
What exactly happens when authenticating through Socialite / JWTAuth and generally through the API in the context of Vue.js (confused about these tokens)?
I found an example of implementing authentication through Laravel/Socialite + Nuxt social networks:
https://github.com/fritsvt/laravel-nuxt-authentication
and there is also a video for it: https://www.youtube.com/playlist?list=PLeZmuYT0mSP ...
It seems to be what I need, but somehow it's too fancy .. For some reason, he also uses https://github.com/tymondesigns/jwt-auth , although social networks are also used when answering in the callback-url they return some token of their own, and then this jwt-auth also gives its own token ... in general, I'm frankly confused
Is it possible to do without JWTAuth somehow?
What generally scheme of authentication/authorization in this case?
Here, for example, GitHub returns me a token along with user data:
token: "0ea876a4b6233744de2da0bd20f5d0c9a06d4790"
refreshToken: null
expiresIn: null
Answer the question
In order to leave comments, you need to log in
The token returned by social networks / github is their authorization token. Login/password analogue, only with limited rights.
With this token, you can knock on the apishki of these social networks on behalf of the user from whom you authorized. I.e. I went to some site through Facebook - that's it, this site can perform some set of actions on your behalf.
JWT can be used for the same implementation of a similar token system, only for users of your application. I.e. someone sent the correct login-password to your apish, you gave the token. With this token, they can knock on your api and perform some actions in the same way.
In general, these are two different tokens, not related to each other. By itself, jwt has nothing to do with it. You can do without it, but it's better to use laravel-passport and don't sweat it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question