tchx84 / linka

An open source service to record air quality data from community sensors
GNU Affero General Public License v3.0
21 stars 12 forks source link

Email registration prototype #74

Closed neowinx closed 3 years ago

neowinx commented 3 years ago

Basic email registration prototype

Linka Email Registration

Just spin up a smpt server (like docker run -d -p 25:25 namshi/smtp) and configure linka with these environment variables:

    MAIL_USERNAME=""
    MAIL_PASSWORD=""
    MAIL_FROM="linka@planeteers.org"
    MAIL_PORT=25
    MAIL_SERVER="localhost"
    MAIL_FROM_NAME="Linka"
    MAIL_TLS=False
    MAIL_SSL=False
    USE_CREDENTIALS=False

or use your gmail account, if you want, like here

The values of these variables can be found on the app/send_email.py

The hash challenge is just using the api_key_hash column of api_keys table but with a different algorithm in order to reuse the field for email validation and api_key storage

disclaimer:

The power is yours!

neowinx

neowinx commented 3 years ago

Sorry for the late response, I was out of town

Sure. I will separate the corresponding parts in another project as soon as I have some spare time

I will close this PR in the meantime

regards!