                let command = `$tokens = Invoke-Auth -ClientID '${app.client_id}' -RedirectUrl '${url}'`;
                            if (String(app.single_page_app).trim().toLowerCase() === "true") { //handle Origin parameter
                                command += " -Origin 'https://doesnotmatter'";
                            }
                            return command;
                        });
                }

                // Generate Device Code Flow command
                if (app.device_c