From dea0e5693d5e1fe30ac0dfadc12eb3e77d971f9f Mon Sep 17 00:00:00 2001 From: child_duckling <19170969+child-duckling@users.noreply.github.com> Date: Thu, 2 Dec 2021 21:58:28 -0800 Subject: [PATCH] url param auth --- docs/app-win/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/app-win/index.js b/docs/app-win/index.js index 4b2870f2..60a5ba61 100644 --- a/docs/app-win/index.js +++ b/docs/app-win/index.js @@ -1,3 +1,9 @@ +const urlParams = new URLSearchParams(window.location.search); +if (urlParams.has('auth')) { + let auth = urlParams.get('auth') + //delete search param +} + var app = new Vue({ el: "#app", data: { @@ -41,7 +47,7 @@ var app = new Vue({ document.addEventListener('musickitloaded', function() { // MusicKit global is now defined MusicKit.configure({ - developerToken: '', + developerToken: `${auth || ''}`, app: { name: 'My Cool Web App', build: '1978.4.1'