Pixelairport's avatar

Understanding twitch login with vue and laravel

As my title says i build an app with laravel for backend and a vue app (frontend). The user should login with his twitch account. But I ask myself, what is the right workaround. I use cartalyst platform (laravel packages), which include a simple one-click solution to login with twitch on a laravel page. Does the user now have to login with the Vue App and then i create the User in the laravel backend via API? The Vue App should be compiled to a mobile app in the end.

I started now with nuxt and nuxt auth. But is it right to do the login with vue and twitch and then check via api if user exists in backend, and if not create the user.

Or should I do something else? I also have to use passport. But this is only to read something like, how many users are in the app or show latest streams and so on... I mean things which are not directly connected to the user and should be public. The user things must have an login... and im just not sure... should i login like i said or should i login against my backend and the backend redirects the user or does the rest? Im so confused and dont want to start in a wrong way.

0 likes
2 replies
Pixelairport's avatar

I have now a nuxt app with a login button. This button redirects to my backendservice, which redirects to twitch and back and then again redirects to my nuxt app. But it seems too much redirects for me... Or is that a possible way? Im logged in. But is that also working when i have a mobile app compiled from my nuxt... Can I say: "Redirect to app instead of an url? Or is the mobile app open an browser in an overlay which can be closed after registering?"

Please or to participate in this conversation.