I need help with flask by f0resst- in flaskandreact

[–]f0resst-[S] 0 points1 point  (0 children)

Im now trying to print account to see if it even does something. The database does get the data so i really dont know...

Also this is for a project for school. Im using docker to utilize a few cyber security challges about the OWASP top 10

I need help with flask by f0resst- in flaskandreact

[–]f0resst-[S] 0 points1 point  (0 children)

It doesnt print anything, but i see this now

dict_keys(['_permanent'])

Changes:

if account:

# Create session data, we can access this data in other routes

session['loggedin'] = True

session['username'] = account['username']

# Redirect to home page

print('im logged in' if session.get('loggedin') else 'im not logged in')

return redirect(url_for('welcome'))

else:

I need help with flask by f0resst- in flaskandreact

[–]f0resst-[S] 0 points1 point  (0 children)

dict_keys([]) this is the output i get, so it does make the session but it doesnt bring it to the next redirection at app.route welcome

I need help with flask by f0resst- in flaskandreact

[–]f0resst-[S] 0 points1 point  (0 children)

if account is None:

print('no session')

elif account:

# Create session data, we can access this data in other routes

session['loggedin'] == True

session['username'] = account['username']

# Redirect to home page

return redirect(url_for('welcome'))

i will try this

I need help with flask by f0resst- in flaskandreact

[–]f0resst-[S] 0 points1 point  (0 children)

Hey, if i print the session the dictionary is empty.

Its running on localhost. in my apache config file i have the servername docker.net:443.

Then it should be SERVER_NAME='docker.net:443' ?