-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update screen when user verifies directly on login #1774
Conversation
eb50c36
to
e736c38
Compare
@nickbristow: Can we get screenshots? |
Oops, didn't realize this was WIP. Carry on :) |
e3f83ed
to
eb587f0
Compare
cc40cf8
to
eac8f94
Compare
service_provider_attributes | ||
if show_completions_page? | ||
track_agency_handoff( | ||
Analytics::USER_REGISTRATION_AGENCY_HANDOFF_PAGE_VISIT | ||
) | ||
else | ||
redirect_to new_user_session_url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I know this is what was there before, but it was confusing to me for a bit and maybe we should change it to root_url
or account_url
? It works and I don't have a strong feeling so I'll leave up to you.
app/decorators/user_decorator.rb
Outdated
@@ -121,6 +121,10 @@ def recent_events | |||
(events + identities).sort { |thing_a, thing_b| thing_b.happened_at <=> thing_a.happened_at } | |||
end | |||
|
|||
def identities | |||
user.identities.order('last_authenticated_at DESC').map(&:decorate) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thoughts on adding a limit to this? Could get out of hand if the user has like 20 SPs they've signed into? We may want to show the last n identities instead of all of them. (cc @mkhandekar)
Also, you can use .order(last_authenticated_at: :desc)
which does the same thing but imo is a little neater. That's an opinion though, so ultimately up to you.
eac8f94
to
d123abb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably add unit tests for Identity#agency_name
, UserDecorator#identities
, and the new SignUpCompletionsShow
methods. At least the ones that do more than return a hardcoded string.
68d15f7
to
c678a1f
Compare
84e80b3
to
17c1f3c
Compare
**Why**: If a user navigates directly to login.gov, they will now see a screen after verifying, that displays the different applications they have authenticated with
17c1f3c
to
56f7bb8
Compare
Why:
If a user navigates directly to login.gov, they
will now see a screen after verifying, that displays
the different applications they have authenticated with