-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyrebase_auth.py
48 lines (41 loc) · 1.27 KB
/
pyrebase_auth.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import pyrebase
firebaseConfig = {
'apiKey': "",
'authDomain': "",
'projectId': "",
'storageBucket': "",
'messagingSenderId': "",
'appId': "",
'measurementId': "",
'databaseURL':""
}
firebase = pyrebase.initialize_app(firebaseConfig)
#Autenticación
#Login y contraseña
auth = firebase.auth()
"""email = input("Entra tu email: ")
password = input("Entra tu password: ")
try:
auth.sign_in_with_email_and_password(email, password)
print("Bienvenido!")
except:
print("Correo ó contraseña incorrectos")"""
#Creación de cuentas de usuarios
"""email = input("Entra tu email: ")
password = input("Entra tu password: ")
confirmpass = input("Confirma tu password: ")
if password == confirmpass:
try:
auth.create_user_with_email_and_password(email, password)
except:
print("El email ya existe")"""
#Verificación de correo
"""email = input("Entra tu email: ")
password = input("Entra tu password: ")
login = auth.sign_in_with_email_and_password(email, password)
auth.send_email_verification(login['idToken'])
print("Verificación en camino")"""
#Recuperación de contraseña
"""email = input("Entra tu email: ")
auth.send_password_reset_email(email)
print("Verificación en camino")"""