Fail to join the meeting. Signature is invalid

Using Laravel to serve the meeting page and trying to join the meeting using web SDK.

 //Set the timezone to UTC
        date_default_timezone_set("UTC");
        $time = time() * 1000 - 30000; //time in milliseconds (or close enough)
        $data = base64_encode($api_key . $meeting_number . $time . $role);
        $hash = hash_hmac('sha256', $data, $api_secret, true);
        $_sig = $api_key . "." . $meeting_number . "." . $time . "." . $role . "." . base64_encode($hash);
        //return signature, url safe base64 encoded
        return rtrim(strtr(base64_encode($_sig), '+/', '-_'), '=');

And the following is the js

<script src="https://source.zoom.us/2.4.5/lib/vendor/react.min.js"></script>
    <script src="https://source.zoom.us/2.4.5/lib/vendor/react-dom.min.js"></script>
    <script src="https://source.zoom.us/2.4.5/lib/vendor/redux.min.js"></script>
    <script src="https://source.zoom.us/2.4.5/lib/vendor/redux-thunk.min.js"></script>
    <script src="https://source.zoom.us/2.4.5/lib/vendor/lodash.min.js"></script>
    <script src="https://source.zoom.us/2.4.5/zoom-meeting-embedded-2.4.5.min.js"></script>

    <script>
        const client = ZoomMtgEmbedded.createClient();
        let meetingSDKElement = document.getElementById('meetingSDKElement');
        client.init({
            debug: true,
            zoomAppRoot: meetingSDKElement,
            language: 'en-US',
            customize: {
                meetingInfo: [
                    'topic',
                    'host',
                    'mn',
                    'pwd',
                    'telPwd',
                    'invite',
                    'participant',
                    'dc',
                    'enctype',
                ],
                toolbar: {
                    buttons: [{
                        text: 'Custom Button',
                        className: 'CustomButton',
                        onClick: () => {
                            console.log('custom button')
                        }
                    }]
                }
            }
        })

        client.join({
            sdkKey: 'sample',
            signature: 'sample',
            meetingNumber: 'sample',
            password: '',
            userName: 'John Doe'
        })
    </script>

@itlh2022,

Thank you for posting in the Zoom Developer Forum – I am happy to help here. To start, can you tell us if verified the correctness of the signature? If not, you can decode and verify the signature with JWT

Let me know if you have any questions about this.

Best,
Donte