Help with creating a login page using a dashboard

Hello everyone, I have a problem with the login page that I created, I can log in if I enter the correct usernames and passwords, however if I press the LOGIN button several times it triggers a pop up that I created, I wanted It only gives this error when I type in the wrong username and password and press the button, but I've already tried and it won't budge.

My flow:

[{"id":"9f5f09ab900ec697","type":"tab","label":"Modulo B Jacareí","disabled":false,"info":"","env":[]},{"id":"d4412161d3e1ebb5","type":"ui_text_input","z":"9f5f09ab900ec697","name":"","label":"usuário","tooltip":"Digite seu usuário","group":"8cfc2cb973109b78","order":0,"width":0,"height":0,"passthru":false,"mode":"text","delay":"","topic":"topic","sendOnBlur":false,"className":"","topicType":"msg","x":160,"y":200,"wires":[["6bd13efb926fd6b4"]]},{"id":"731f8ae3d04d9a07","type":"ui_text_input","z":"9f5f09ab900ec697","name":"","label":"senha","tooltip":"Digite sua senha","group":"8cfc2cb973109b78","order":0,"width":0,"height":0,"passthru":false,"mode":"password","delay":"","topic":"topic","sendOnBlur":false,"className":"","topicType":"msg","x":150,"y":300,"wires":[["ce3322e7b071ebca"]]},{"id":"6bd13efb926fd6b4","type":"function","z":"9f5f09ab900ec697","name":"function 63","func":"msg.payload1 = msg.payload\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":310,"y":200,"wires":[["f23f1ff7dbe17d1e"]]},{"id":"ce3322e7b071ebca","type":"function","z":"9f5f09ab900ec697","name":"function 64","func":"msg.payload2 = msg.payload\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":310,"y":300,"wires":[["f23f1ff7dbe17d1e"]]},{"id":"1688abe5626d4525","type":"ui_toast","z":"9f5f09ab900ec697","position":"dialog","displayTime":"3","highlight":"","sendall":true,"outputs":1,"ok":"OK","cancel":"","raw":false,"className":"","topic":"","name":"","x":1330,"y":640,"wires":[[]]},{"id":"16be97b63dbed94d","type":"ui_button","z":"9f5f09ab900ec697","name":"","group":"8cfc2cb973109b78","order":2,"width":0,"height":0,"passthru":false,"label":"LOGIN","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"true","payloadType":"bool","topic":"topic","topicType":"msg","x":160,"y":440,"wires":[["b91fdc5637a02829"]]},{"id":"cdd08ad01716dbe1","type":"ui_led","z":"9f5f09ab900ec697","order":0,"group":"945617d0a2c011bb","width":0,"height":0,"label":"","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"#928b8b","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"","x":190,"y":580,"wires":[]},{"id":"98b91da54a2fb387","type":"ui_button","z":"9f5f09ab900ec697","name":"","group":"8cfc2cb973109b78","order":2,"width":0,"height":0,"passthru":false,"label":"CANCELAR","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"","payloadType":"num","topic":"topic","topicType":"msg","x":110,"y":240,"wires":[["d4412161d3e1ebb5","731f8ae3d04d9a07"]]},{"id":"e737e9dd69f22042","type":"ui_led","z":"9f5f09ab900ec697","order":0,"group":"0acbfe8e41909f8d","width":0,"height":0,"label":"","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"#928b8b","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"","x":190,"y":620,"wires":[]},{"id":"b91fdc5637a02829","type":"function","z":"9f5f09ab900ec697","name":"function 69","func":"msg.payload3 = msg.payload\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":390,"y":440,"wires":[["0a0a14d0f4505822"]]},{"id":"7af2371ff5218fba","type":"ui_ui_control","z":"9f5f09ab900ec697","name":"","events":"all","x":1360,"y":300,"wires":[[]]},{"id":"fb1ac053bec5caf9","type":"switch","z":"9f5f09ab900ec697","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"us","vt":"str"},{"t":"eq","v":"lf","vt":"str"},{"t":"eq","v":"vl","vt":"str"}],"checkall":"false","repair":false,"outputs":3,"x":610,"y":260,"wires":[["a3f523c88a609bdd"],["a3f523c88a609bdd"],["a3f523c88a609bdd"]]},{"id":"f23f1ff7dbe17d1e","type":"join","z":"9f5f09ab900ec697","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":330,"y":260,"wires":[["04def968bb097f32"]]},{"id":"04def968bb097f32","type":"function","z":"9f5f09ab900ec697","name":"function 70","func":"if(msg.payload1 == \"manutencao\" && msg.payload2 == \"cfp101\"){\n    msg.payload = \"us\"\n}else if (msg.payload1 == \"visitante\" && msg.payload2 == \"senai123\"){\n    msg.payload= \"vl\"\n}else{msg.payload = \"lf\"}\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":470,"y":260,"wires":[["fb1ac053bec5caf9"]]},{"id":"88cbedb3111b7c44","type":"join","z":"9f5f09ab900ec697","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":910,"y":300,"wires":[["77467234f0521602"]]},{"id":"77467234f0521602","type":"function","z":"9f5f09ab900ec697","name":"function 71","func":"if(msg.payload4 == \"us\" && msg.payload3 == true){\n    msg.payload = \"Logado\"\n}else if (msg.payload4 == \"vl\" && msg.payload3 == true){\n    msg.payload = \"Visit\"}\nelse {msg.payload = \"Falha\"}\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1170,"y":340,"wires":[["7af2371ff5218fba","1f4d476e029a20b2"]]},{"id":"a3f523c88a609bdd","type":"function","z":"9f5f09ab900ec697","name":"function 72","func":"msg.payload4 = msg.payload\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":630,"y":140,"wires":[["88cbedb3111b7c44"]]},{"id":"8d5ea64d1c1f7e0c","type":"change","z":"9f5f09ab900ec697","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"Falha","fromt":"str","to":"Senha ou usuários incorretos","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"Falha no login","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1280,"y":560,"wires":[["1688abe5626d4525"]]},{"id":"1f4d476e029a20b2","type":"switch","z":"9f5f09ab900ec697","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Falha","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1210,"y":460,"wires":[["8d5ea64d1c1f7e0c"]]},{"id":"0a0a14d0f4505822","type":"switch","z":"9f5f09ab900ec697","name":"","property":"payload","propertyType":"msg","rules":[{"t":"true"}],"checkall":"false","repair":false,"outputs":1,"x":610,"y":440,"wires":[["88cbedb3111b7c44"]]},{"id":"8cfc2cb973109b78","type":"ui_group","name":"LOGIN","tab":"71af5b55d0c4ef4a","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"945617d0a2c011bb","type":"ui_group","name":"Logado","tab":"e4434785930e8db8","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"0acbfe8e41909f8d","type":"ui_group","name":"Visit","tab":"2b7e6f98fd2fedf0","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"71af5b55d0c4ef4a","type":"ui_tab","name":"LOGIN","icon":"dashboard","disabled":false,"hidden":true},{"id":"e4434785930e8db8","type":"ui_tab","name":"Logado","icon":"dashboard","disabled":false,"hidden":true},{"id":"2b7e6f98fd2fedf0","type":"ui_tab","name":"Visit","icon":"dashboard","disabled":false,"hidden":true}]

Detail: The username and password value only goes if you press enter or tab

usuario "manutencao"
senha "cfp101"

Thanks for the answer, but in this application I can't use other nodes, just the node patterns and the dashboard UI

because the join node just waits for any 2 messages to come. Make the join node a key/value Object , it should solve your issue. I have not checked the flow myself, as there is some issue with your flow.

[{"id":"9f5f09ab900ec697","type":"tab","label":"Modulo B Jacareí","disabled":false,"info":"","env":[]},{"id":"d4412161d3e1ebb5","type":"ui_text_input","z":"9f5f09ab900ec697","name":"","label":"usuário","tooltip":"Digite seu usuário","group":"8cfc2cb973109b78","order":0,"width":0,"height":0,"passthru":false,"mode":"text","delay":"","topic":"topic","sendOnBlur":false,"className":"","topicType":"msg","x":160,"y":200,"wires":[["6bd13efb926fd6b4"]]},{"id":"731f8ae3d04d9a07","type":"ui_text_input","z":"9f5f09ab900ec697","name":"","label":"senha","tooltip":"Digite sua senha","group":"8cfc2cb973109b78","order":0,"width":0,"height":0,"passthru":false,"mode":"password","delay":"","topic":"topic","sendOnBlur":false,"className":"","topicType":"msg","x":150,"y":300,"wires":[["ce3322e7b071ebca"]]},{"id":"6bd13efb926fd6b4","type":"function","z":"9f5f09ab900ec697","name":"function 63","func":"msg.payload1 = msg.payload\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":310,"y":200,"wires":[["f23f1ff7dbe17d1e"]]},{"id":"ce3322e7b071ebca","type":"function","z":"9f5f09ab900ec697","name":"function 64","func":"msg.payload2 = msg.payload\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":310,"y":300,"wires":[["f23f1ff7dbe17d1e"]]},{"id":"1688abe5626d4525","type":"ui_toast","z":"9f5f09ab900ec697","position":"dialog","displayTime":"3","highlight":"","sendall":true,"outputs":1,"ok":"OK","cancel":"","raw":false,"className":"","topic":"","name":"","x":1330,"y":640,"wires":[[]]},{"id":"16be97b63dbed94d","type":"ui_button","z":"9f5f09ab900ec697","name":"","group":"8cfc2cb973109b78","order":2,"width":0,"height":0,"passthru":false,"label":"LOGIN","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"true","payloadType":"bool","topic":"topic","topicType":"msg","x":160,"y":440,"wires":[["b91fdc5637a02829"]]},{"id":"cdd08ad01716dbe1","type":"ui_led","z":"9f5f09ab900ec697","order":0,"group":"945617d0a2c011bb","width":0,"height":0,"label":"","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"#928b8b","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"","x":190,"y":580,"wires":[]},{"id":"98b91da54a2fb387","type":"ui_button","z":"9f5f09ab900ec697","name":"","group":"8cfc2cb973109b78","order":2,"width":0,"height":0,"passthru":false,"label":"CANCELAR","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"","payloadType":"num","topic":"topic","topicType":"msg","x":110,"y":240,"wires":[["d4412161d3e1ebb5","731f8ae3d04d9a07"]]},{"id":"e737e9dd69f22042","type":"ui_led","z":"9f5f09ab900ec697","order":0,"group":"0acbfe8e41909f8d","width":0,"height":0,"label":"","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"#928b8b","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"","x":190,"y":620,"wires":[]},{"id":"b91fdc5637a02829","type":"function","z":"9f5f09ab900ec697","name":"function 69","func":"msg.payload3 = msg.payload\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":390,"y":440,"wires":[["0a0a14d0f4505822"]]},{"id":"7af2371ff5218fba","type":"ui_ui_control","z":"9f5f09ab900ec697","name":"","events":"all","x":1360,"y":300,"wires":[[]]},{"id":"fb1ac053bec5caf9","type":"switch","z":"9f5f09ab900ec697","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"us","vt":"str"},{"t":"eq","v":"lf","vt":"str"},{"t":"eq","v":"vl","vt":"str"}],"checkall":"false","repair":false,"outputs":3,"x":610,"y":260,"wires":[["a3f523c88a609bdd"],["a3f523c88a609bdd"],["a3f523c88a609bdd"]]},{"id":"f23f1ff7dbe17d1e","type":"join","z":"9f5f09ab900ec697","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":330,"y":260,"wires":[["04def968bb097f32"]]},{"id":"04def968bb097f32","type":"function","z":"9f5f09ab900ec697","name":"function 70","func":"if(msg.payload1 == \"manutencao\" && msg.payload2 == \"cfp101\"){\n    msg.payload = \"us\"\n}else if (msg.payload1 == \"visitante\" && msg.payload2 == \"senai123\"){\n    msg.payload= \"vl\"\n}else{msg.payload = \"lf\"}\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":470,"y":260,"wires":[["fb1ac053bec5caf9"]]},{"id":"88cbedb3111b7c44","type":"join","z":"9f5f09ab900ec697","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":980,"y":300,"wires":[["77467234f0521602"]]},{"id":"77467234f0521602","type":"function","z":"9f5f09ab900ec697","name":"function 71","func":"if(msg.payload4 == \"us\" && msg.payload3 == true){\n    msg.payload = \"Logado\"\n}else if (msg.payload4 == \"vl\" && msg.payload3 == true){\n    msg.payload = \"Visit\"}\nelse {msg.payload = \"Falha\"}\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1170,"y":340,"wires":[["7af2371ff5218fba","1f4d476e029a20b2"]]},{"id":"a3f523c88a609bdd","type":"function","z":"9f5f09ab900ec697","name":"function 72","func":"msg.payload4 = msg.payload\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":630,"y":140,"wires":[["7235d2295b298584"]]},{"id":"8d5ea64d1c1f7e0c","type":"change","z":"9f5f09ab900ec697","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"Falha","fromt":"str","to":"Senha ou usuários incorretos","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"Falha no login","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1280,"y":560,"wires":[["1688abe5626d4525"]]},{"id":"1f4d476e029a20b2","type":"switch","z":"9f5f09ab900ec697","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Falha","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1210,"y":460,"wires":[["8d5ea64d1c1f7e0c"]]},{"id":"0a0a14d0f4505822","type":"switch","z":"9f5f09ab900ec697","name":"","property":"payload","propertyType":"msg","rules":[{"t":"true"}],"checkall":"false","repair":false,"outputs":1,"x":610,"y":440,"wires":[["552ed35850868172"]]},{"id":"552ed35850868172","type":"change","z":"9f5f09ab900ec697","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"two","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":810,"y":330,"wires":[["88cbedb3111b7c44"]]},{"id":"7235d2295b298584","type":"change","z":"9f5f09ab900ec697","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"one","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":810,"y":270,"wires":[["88cbedb3111b7c44"]]},{"id":"8cfc2cb973109b78","type":"ui_group","name":"LOGIN","tab":"71af5b55d0c4ef4a","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"945617d0a2c011bb","type":"ui_group","name":"Logado","tab":"e4434785930e8db8","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"0acbfe8e41909f8d","type":"ui_group","name":"Visit","tab":"2b7e6f98fd2fedf0","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"71af5b55d0c4ef4a","type":"ui_tab","name":"LOGIN","icon":"dashboard","disabled":false,"hidden":true},{"id":"e4434785930e8db8","type":"ui_tab","name":"Logado","icon":"dashboard","disabled":false,"hidden":true},{"id":"2b7e6f98fd2fedf0","type":"ui_tab","name":"Visit","icon":"dashboard","disabled":false,"hidden":true}]

sorry, i could not follow what you meant here.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.