ext.onAuthorized never fires so token is always undefined in fetch requests

I have all of those set in every single page.

<head>
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <link href="config.css" rel="stylesheet" />
        <script src="https://extension-files.twitch.tv/helper/v1/twitch-ext.min.js"></script>
 </head>
var token, userID, secret;
twitch.onAuthorized((auth) =>{
    console.log("onAuthorized Fired!!!");
    token = auth.token;
    userID = auth.userID;
});

I did finally have onError Fire

TWITCH ERROR:  Error: Twitch.ext.configuration.set attempted before onAuthorized returned
    at Object.setConfiguration (:30:82223)
    at setConfig (F:\Local Documents\Documents\VisualStudioCodeProjects\FG Character Sheet Viewer Twitch Extension\config.js:74:30)
    at HTMLInputElement.<anonymous> (https://localhost:5501/config.js:55:9) {stack: 'Error: Twitch.ext.configuration.set attempted…mous> (https://localhost:5501/config.js:55:9)', message: 'Twitch.ext.configuration.set attempted before onAuthorized returned'}

So was this a timing thing? Should I give the page some time before running tests through it? Or is it since the page script is at the footer?