mirror of
https://github.com/wassname/flask-security.git
synced 2026-08-11 11:18:40 +08:00
Starting a large refactor and adding confirmation abilities
This commit is contained in:
@@ -9,11 +9,18 @@
|
||||
:license: MIT, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
import base64
|
||||
import os
|
||||
|
||||
from importlib import import_module
|
||||
|
||||
from flask import url_for, flash, current_app, request, session
|
||||
|
||||
|
||||
def generate_token():
|
||||
return base64.urlsafe_b64encode(os.urandom(30))
|
||||
|
||||
|
||||
def do_flash(message, category):
|
||||
if config_value(current_app, 'FLASH_MESSAGES'):
|
||||
flash(message, category)
|
||||
|
||||
Reference in New Issue
Block a user