1👍
✅
You’ve answered your question.
Use a session that will persist the value (as long as the session is active).
request.session['auth_type'] = 'SecureID'
Then you can always make a decision based on the session value you stored earlier.
if request.session['auth_type'] == 'SecureID':
# do two factor auth stuff
pass
else:
# do normal stuff
pass
Source:stackexchange.com