Here is my implementation of an alternative session token. The idea is to reset session_token every time get_id is called, so (I think) the session would be made less vulnerable to hijacks or similar attacks.import osfrom flask_login import UserMixinfrom app import db, login_managerclass User(UserMixin, db.Model):    __tablename__ = 'users'    id = db.Column(db.Integer, primary_key = True)    session_token = db.Column(db.Unicode)    def get_id(self):        self.session_token = os.urandom(64).decode('utf-8', 'ignore')        return self.session_token@login_manager.user_loaderdef load_user(session_token):    return User.query.filter_by(session_token=session_token).first()I hope you can tell me...if this really makes the session safer.how can I handle unicode decoding more elegantly.if it have any issues on stability.if it have any issues on performance.
Alternative session token implementation in flask
python;sql;session;flask;unicode