You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Must be tested behind proxy to know if it works. I identified two
problems here:
1) `flask-dance` was redirecting to `/` by default, but the app in
production is hosted behind a proxy at `/apps/benefit-tool`. We need
to generate the correct URL with `url_for` for the proxy to be taken
in to account.
2) The old login route needs to be hit twice to actually log in a user.
The first time through, it sends the user to Google, and at the end
of that, the user winds back up in the app without having hit the
`login_user()` call. At this point, Google has authorized the user,
so when they hit `/login` again, they'll hit the `login_user()` call.
Both of these problems are addressed by hooking the `oauth_authorized`
signal (https://flask-dance.readthedocs.io/en/latest/signals.html) and
moving the login & user-insertion behavior there.
Resolves#178
Must be tested behind proxy to know if it works. I identified two
problems here:
1) `flask-dance` was redirecting to `/` by default, but the app in
production is hosted behind a proxy at `/apps/benefit-tool`. We need
to generate the correct URL with `url_for` for the proxy to be taken
in to account.
2) The old login route needs to be hit twice to actually log in a user.
The first time through, it sends the user to Google, and at the end
of that, the user winds back up in the app without having hit the
`login_user()` call. At this point, Google has authorized the user,
so when they hit `/login` again, they'll hit the `login_user()` call.
Both of these problems are addressed by hooking the `oauth_authorized`
signal (https://flask-dance.readthedocs.io/en/latest/signals.html) and
moving the login & user-insertion behavior there.
Resolves#178Resolves#58
Log in often sends users to this page: https://usaon.org/evaluation-and-planning/benefit-tool rather than into the benefit tool application. Priority issue to fix.
The text was updated successfully, but these errors were encountered: