Hey, I uploaded a video to Vimeo and checked " hide video from Vimeo". I also whitelisted my domain. The video can now only be watched if it is embed on my website.
However, how I can make sure that only authorized users may watch it? Currently, anyone who visits my website and knows the url of my private video, could watch it, simply by using the browser-inspector tool and copy/paste an iframe with the url. Is there a way to make sure a user is authenticated before showing the video?
If I unederstand you properly, you simply use auth in your view file to check whether the user is authenticated or not. Only that time, you show the vimeo video.
For example-
@auth
// The user is authenticated...
// Show the vimeo video
@endauth
@guest
// The user is not authenticated...
// Show whatever you want to show
@endguest
Yes of course, thats how to set it up. My issue is, that anyone who has the vimeo url can still watch it if he manually inserts an iframe with inspection tool.
@deekshith I contacted Vimeo and it seems that there is no solution to this problem. You can try it on laracast as well. If you logout but copy an iframe with the inspection tool, then you can watch the videos here without beeing a member.
As I am new to all this I might be wrong, but, why not try this:
@if (Auth::user())
@auth
// The user is authenticated...
// Show the vimeo video
@endauth
@else
@guest
// The user is not authenticated...
// Show whatever you want to show
@endguest
@endif
Hi, yeah thats how you authenticate in Laravel, this is the same that tisuchi suggested. My question was, if there is some authentication between Laravel and Vimeo, because if someone got the URL you can't prevent them from watching the video. I was asking for another layer of security.
@elenktik Actually the problem is if i am a paid user i can able to view the video and someone inspects the web page and copy the iframe and he can play same iframe in our website home page as vimeo domain whitelisting only works for parent domain. i have one solution for this providing temporary url for vimeo video url just like creating temporary url in server end that is using laravel?