How to transfer the selected device data of "list_devices" view to "login_credentials" view?

This is my pair json:

"pair": [
        {
            "id": "list_devices",
            "template": "list_devices",
            "options": {
                "singular": true
            },
            "navigation": {
                "next": "login_credentials"
            }
        },
        {
            "id": "login_credentials",
            "template": "login_credentials"
        }
    ],

I want to show the list first, select a device, then log in, and add the device only after the login is successful, but in “login_credentials”, I don’t know how to get the selected data