gaw89 / dash-flask-login

A plugin to integrate Dash and Flask-Login
MIT License
56 stars 17 forks source link

for some reason login is not redirecting to app1 #5

Open gjovanovicl opened 6 years ago

gjovanovicl commented 6 years ago

Hi,

I´ve tested using "usage_dash_flask_login.py" and the application can´t redirect after a succesful login.

request.args.get('next') never gets "app1"

@server.route('/login', methods=['GET', 'POST']) def login(): if request.method == 'POST':

    if request.args.get('next'):

        return redirect(request.args.get('next'))

    else:

return redirect('http://localhost:8049/app1', code=302)

        return redirect('/login')
else:
    return redirect('/login')

The only way I can log to app1 is adding the commented line but it works only in Firefox and Edge not in Chrome.

I would appreciate your help.