From d90fc3bd81d6d6ff9f58167c58174a0e3172d33e Mon Sep 17 00:00:00 2001 From: juancarmore Date: Mon, 27 May 2024 19:07:03 +0200 Subject: [PATCH] Add getToken comment in Vue tutorial --- application-client/openvidu-vue/src/App.vue | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/application-client/openvidu-vue/src/App.vue b/application-client/openvidu-vue/src/App.vue index fb21229d..4eff8551 100644 --- a/application-client/openvidu-vue/src/App.vue +++ b/application-client/openvidu-vue/src/App.vue @@ -106,6 +106,19 @@ onUnmounted(() => { leaveRoom(); }); +/** + * -------------------------------------------- + * GETTING A TOKEN FROM YOUR APPLICATION SERVER + * -------------------------------------------- + * The method below request the creation of a token to + * your application server. This prevents the need to expose + * your LiveKit API key and secret to the client side. + * + * In this sample code, there is no user control at all. Anybody could + * access your application server endpoints. In a real production + * environment, your application server must identify the user to allow + * access to the endpoints. + */ async function getToken(roomName: string, participantName: string) { const response = await fetch(APPLICATION_SERVER_URL + 'token', { method: 'POST',