def METHOD_NAME(req):
    cookie_name = 'next-auth.session-token' if DEBUG else '__Secure-next-auth.session-token'
    raw_jwe = req.COOKIES[cookie_name]
    jwe_decryption_key = HKDF(
        master=os.environ['DASHBOARD_JWT_KEY'].encode(),
        key_len=32,
        salt="".encode(),
        hashmod=SHA256,
        num_keys=1,
        context=str.encode("NextAuth.js Generated Encryption Key")
    )
    payload_string = jwe.decrypt(raw_jwe, jwe_decryption_key).decode()
    payload = json.loads(payload_string)
    return payload['sub']