dpgaspar / Flask-AppBuilder

Simple and rapid application development framework, built on top of Flask. includes detailed security, auto CRUD generation for your models, google charts and much more. Demo (login with guest/welcome) - http://flaskappbuilder.pythonanywhere.com/
BSD 3-Clause "New" or "Revised" License
4.66k stars 1.36k forks source link

Hardcoding the class name in login_oauth.html and register_oauth.html #1182

Open snivas opened 4 years ago

snivas commented 4 years ago

There is an issue when we create a custom class for handling AuthOAuthView. The issue is caused by below lines,

-var baseLoginUrl = "{{url_for('AuthOAuthView.login')}}"; -var baseRegisterUrl = "{{url_for('AuthOAuthView.login')}}";

Should we must give "AuthOAuthView.login" there? suppose if we have a custom class that implements AuthOAuthView with name CustomOAuthView then flask is throwing error. Shall we change like below?

+var baseLoginUrl = "{{appbuilder.get_url_for_login}}"; +var baseRegisterUrl = "{{appbuilder.get_url_for_registeruser}}";

Likely,

why we need url parameter in "function set_openid(url, pr)". As it is not used, shall we remove it?

dpgaspar commented 4 years ago

Seems right, can you open a PR?

snivas commented 4 years ago

Could you give permission for me to commit?