sounds like a task for Passport, Laravel's built in Oauth2 server
Laravel provides authentication to other app
I have a web built on Laravel. My users can use one of the web pages to upload huge files (could be in giga bytes). A TUS (tus.io) server is running inside my web server machine to handle file uploading.
File uploading in the web page is handled by tus client, which is done in JavaScript . So far, everything works well, except that there is no authentication between tus client and server. Of course, users must log in to access the file uploading page. However, they can mark up web page to do file uploading without authentication if they want to, by inspecting my uploading web code.
I want to make the TUS server to talk to Laravel server about authentication. For example, the TUS client must include a user ID in its handshake message to server, which after getting the user ID will check with Laravel server if that user is authenticated.
In Laravel, we have very simple check like Auth::check(), how can I pass this to an another app like the TUS server?
Please or to participate in this conversation.