Skip to content

Generate secret key during first run and store it in the database #4

Description

@traverseda

Realistically the user never needs to care about the secret key, it can be auto-generated during the first run. I think it makes sense to put it in the database and not the file system because that way if you use a distributed database backend like cockroachDb every node gets the same secret key and everything sort of just works.

import secrets
secret_key=secrets.token_urlsafe(50)

Is part of the standard library.

Just removes a little bit more friction when people set up the service for the first time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions