Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ssaguiar
Streaming Star

Do not DynamicKeyboard show asterisks when asking for a password?

Jump to solution

Hi to all

I am developing a channel on which I need to login our users.

The problem  see is that the DynamicKeyboard (or any keyboard) does not show asterisks (*) when we are asking for passwords. The password is shown in plain text in the textEditBox.

I have tried to use the keyboardDomain in the DynamicKeyboard and set it to "password" but it still don't work.

All passwords are shown and this is not good for security.

Is there any way to override this behaviour ?

If so, is there any chance to have some code examples or documentation about this matter?

None of the examples I have seen the last days have this problem solved.

Thank you for some help.

 

 

0 Kudos
1 Solution

Accepted Solutions
renojim
Community Streaming Expert

Re: Do not DynamicKeyboard show asterisks when asking for a password?

Jump to solution

StandardKeyboardDialog doesn't have those properties.  You should have seen warnings in the debug console.  The textEditBox does.  Try:

m.loginKeyboard = m.top.findNode("loginKeyboard")
m.loginKeyboard.textEditBox.voiceEnabled = true
m.loginKeyboard.textEditBox.secureLastCharacter = true
m.loginKeyboard.textEditBox.secureMode = true
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.

View solution in original post

5 REPLIES 5
ssaguiar
Streaming Star

Re: Do not DynamicKeyboard show asterisks when asking for a password?

Jump to solution

 

Is correct that the password field content is shown in plain text?

0 Kudos
speechles2
Reel Rookie

Re: Do not DynamicKeyboard show asterisks when asking for a password?

Jump to solution

The best way to find out is dump the component to screen.

<Component: roSGNode:VoiceTextEditBox> =
{
disableVoiceUnderscoreControl: false
isDictating: false
voiceEnabled: false
voiceEntryType: "alphanumeric"
voiceInputRegexFilter: ""
active: true
backgroundUri: ""
centerUnderscores: false
clearOnDownKey: false
cursorPosition: 0
fontSize: -1
fontUri: ""
height: -1
hintText: ""
hintTextColor: -269488282
leadingEllipsis: false
maxTextLength: 75
secureLastCharacter: false
secureMode: false
showUnderscores: false
text: ""
textColor: -269488129
width: 1368
palette: <Component: roInvalid>
childRenderOrder: "last"
clippingRect: <Component: roAssociativeArray>
enableRenderTracking: true
inheritParentOpacity: true
inheritParentTransform: true
muteAudioGuide: false
opacity: 1
renderPass: 0
renderTracking: "none"
rotation: 0
scale: <Component: roArray>
scaleRotateCenter: <Component: roArray>
translation: <Component: roArray>
visible: true
change: <Component: roAssociativeArray>
focusable: true
focusedChild: <Component: roInvalid>
id: ""
}

You want SecureMode and/or SecureLastCharacter set to true.

ssaguiar
Streaming Star

Re: Do not DynamicKeyboard show asterisks when asking for a password?

Jump to solution

This doesn't work.

Even with 

secureLastCharacter = "true"
secureMode = "true"
 
The text keeps showing in plain mode.
 
This is my code:
 
xml:
 
<Rectangle
    id = "LoginContainer"
    translation = "[0,100]"
    width = "1920"
    height = "980"
    color = "0x00000000"
    opacity = "1.0" >
    <StandardKeyboardDialog
        id = "loginKeyboard"
        secureLastCharacter = "true"
        secureMode = "true" >
    </StandardKeyboardDialog>
</Rectangle>
 
brs:
 
m.customPalette = createObject("roSGNode", "RSGPalette")

' Login keyboard colours palette:
m.customPalette.colors = {
DialogBackgroundColor: "0x1A281FB0",
DialogItemColor: "0x000000FF",
DialogTextColor: "0xFFFFFFFF",
DialogFocusColor: "0xFFFFFFFF",
DialogFocusItemColor: "0x666666FF",
DialogSecondaryTextColor: "0xFFFFFF66",
DialogSecondaryItemColor: "0x80FFFF4D",
DialogInputFieldColor: "0x4D4D4D80",
DialogKeyboardColor: "0x635255A0",
DialogFootprintColor: "0x333333FF"
}
 
m.loginKeyboard = m.top.findNode("loginKeyboard")
m.loginKeyboard.textEditBox.voiceEnabled = true
 
m.loginKeyboard.palette = m.customPalette
m.loginKeyboard.setFocus(true)
askForUsername()
 
'===============================================================

sub askForUsername()
m.usernameText = ""
m.loginKeyboard.keyboardDomain = "alphanumeric"
m.loginKeyboard.textEditBox.voiceEnabled = true
m.loginKeyboard.setFocus(true)
m.loginKeyboard.title = "Login - Informe seu nome de usuário:"
m.loginKeyboard.text = ""
m.loginKeyboard.buttons = ["OK"]
m.loginKeyboard.unobserveFieldScoped("text")
m.loginKeyboard.unobserveFieldScoped("buttonSelected")
m.loginKeyboard.observeFieldScoped("text", "usernameTextChanged")
m.loginKeyboard.observeFieldScoped("buttonSelected", "askForPassword")
end sub

'===============================================================

sub askForPassword()
m.usernameText = m.loginKeyboard.text
m.passwordText = ""
m.loginKeyboard.keyboardDomain = "password"
m.loginKeyboard.textEditBox.voiceEnabled = true
m.loginKeyboard.setFocus(true)
m.loginKeyboard.title = "Login - Informe sua senha:"
m.loginKeyboard.text = ""
m.loginKeyboard.buttons = ["Cancelar", "OK"]
m.loginKeyboard.unobserveFieldScoped("text")
m.loginKeyboard.unobserveFieldScoped("buttonSelected")
m.loginKeyboard.observeFieldScoped("text", "passwordTextChanged")
m.loginKeyboard.observeFieldScoped("buttonSelected", "onLoginButtonClicked")
end sub

'===============================================================
 
0 Kudos
renojim
Community Streaming Expert

Re: Do not DynamicKeyboard show asterisks when asking for a password?

Jump to solution

StandardKeyboardDialog doesn't have those properties.  You should have seen warnings in the debug console.  The textEditBox does.  Try:

m.loginKeyboard = m.top.findNode("loginKeyboard")
m.loginKeyboard.textEditBox.voiceEnabled = true
m.loginKeyboard.textEditBox.secureLastCharacter = true
m.loginKeyboard.textEditBox.secureMode = true
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
ssaguiar
Streaming Star

Re: Do not DynamicKeyboard show asterisks when asking for a password?

Jump to solution

THANK you very very much renojim.

This solved the problem.

I was very disapointed as I could not find an answer and has no clue on how some interface for password could not have some secure entry.

Again, thank you.

0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.