miguelgrinberg / flasky

Companion code to my O'Reilly book "Flask Web Development", second edition.
MIT License
8.54k stars 4.21k forks source link

Question on before_request and unconfirmed routes. #547

Closed nneessen closed 1 year ago

nneessen commented 1 year ago

I've created a dummy user and intentionally not confirmed my account, however, it stays on that auth/uncofirmed route, and won't let me logout to login as someone else unless i change the render template('auth/uconfirmed') to redirect (url_for('security.login')

miguelgrinberg commented 1 year ago

Are you using the code from this project or have you made modifications? There is no security.login endpoint in this project. The login and logout routes are in the auth blueprint, and this blueprint is exempt from the redirection to the unconfirmed template, so you should be able to logout.

nneessen commented 1 year ago

i'm actually using flask-security-too for login/logout/register, etc.

miguelgrinberg commented 1 year ago

Then you need to adapt the logic that displays the unconfirmed page.

nneessen commented 1 year ago

Got it, thank you!