Python pyrebase user auth
Hello guys, how can I get user auth refresh token and local id ? -- https://mail.python.org/mailman/listinfo/python-list
using regex for password validation
hello guys,
I have this pattern for password validation (regex):
I want these rules to be applied:
Minimum 8 characters.
The alphabets must be between [a-z]
At least one alphabet should be of Upper Case [A-Z]
At least 1 number or digit between [0-9].
At least 1 character from [ _ or @ or $ ].
and this pattern:
passwordpattern = "^(?=.[a-z])(?=.[A-Z])(?=.\d)(?=.[@$])[A-Za-z\d@$!%?&]{8,}.$"
my only issue is that I want to add the symbol () and symbol(.) in the pattern
where only it accepts $ and @, I tried adding generally like [@_$] not working
--
https://mail.python.org/mailman/listinfo/python-list
Pyrebase auth
I am using signup method:
user_signup = auth.create_user_with_email_and_password(email, password)
and my firebase rules are:
{
"rules": {
".read": false,
".write": false,
"$localId": {
".write": "auth.uid === $localId",
".read": "auth.uid === $localId"
}
}
}
I used:
data = {"item1":"hat","item2":"car"}
results = db.child("users").update(data, user['idToken'])
the only way to patch (update) is to use:
".read": true,
".write": true,
which means that anyone can read or write in my database where I only want the
user to write or read if his idtoken or localid is authorized, even if data is
outside his region for ex:
database:
"number_of_users":"2"
"userlocalid":
{"item1":"hat"}
{"item2":"car"}
--
https://mail.python.org/mailman/listinfo/python-list
kivy,,, assigning global variable
class main(..):
def init.:
super.
button = Button(on_release=self.on_click)
def on_click(self,screen,*args)
self.clear_widgets()
if screen == '2nd':
float = 2nd()
elif screen == '1st':
float = 1st()
self.add_widget(float)
class 2nd(...):
string_text = StringProperty()
def init.:
super.
Text = TextInput(text=self.string_text)
button=Button(on_release=self.on_click)
def on_click
self.parent.on_click('1st')
class 1st(...):
#my only issue is in class 2nd() how can I change the value of the variable
string_text, if I am clearing widgets and adding widget again in parent class (
main()), then string_text will again equal to empty , I tried to add
string_text variable in main() but the same issue I am getting, how can I save
the string_text in 2nd() if am removing it and adding it again ?
--
https://mail.python.org/mailman/listinfo/python-list
