Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Logged out user workflow - registration should use customer workflow, not the community workflow #401

Closed
wdprice opened this issue Jul 22, 2021 · 15 comments

Comments

@wdprice
Copy link

wdprice commented Jul 22, 2021

When a user who is not logged in is required to sign up at the end of the process, they are currently directed to the community signup workflow:
image

They should be sent to the customer sign up workflow:
image

@nikolay83
Copy link
Collaborator

@urwithat
need you to merge the PR, I don't have write-access to the repo
topcoder-archive/topcoder-platform-mfe-header#28

nikolay83 added a commit that referenced this issue Jul 27, 2021
feat: polish release - v1.2 - Milestone19. Addresses #400, #401, #402, #404, #406, #407.
@sdgun
Copy link

sdgun commented Jul 28, 2021

@nikolay83 Verified in Dev, registration is using customer workflow, but after a new customer signs in, we are redirecting the customer to connect app, not to the create new team app.

sign.up.mp4

@cagdas001
Copy link
Contributor

@sdgun @nikolay83 This is not something that I can fix. It's about the auth flow. As usual, it redirects to Connect after activating the account. What I suggest: after the account has been activated, you can send another mail: "Your search results are ready. Click here to view..." (or something similar) And clicking that link will redirect the user to the search results

@nikolay83
Copy link
Collaborator

@urwithat @maxceem
what do you think can be a solution here?

@maxceem
Copy link
Contributor

maxceem commented Jul 30, 2021

Not sure if we can control the link inside the registration email somehow. Need to find someone familiar with Auth workflow.

@cagdas001
Copy link
Contributor

@maxceem I meant another mail, not the activation or registration email itself. An email that will be sent out directly/purely from the TaaS API. You're posting the account activation events to Kafka, right? If so, we can simply listen to these events and generate & send an email with the intended template & link, in case the user has unfinalized search results. So, after the user activated his account, he'll get another mail (other than the welcome email) from TaaS API, saying something like "Your search results are ready, click here to view it..." That's what I meant

@maxceem
Copy link
Contributor

maxceem commented Jul 30, 2021

You're posting the account activation events to Kafka, right?

I'm not sure about this, not very familiar with Auth/Registration workflow.

If there is such a Kafka event then your idea might work. Though what I understand from this comment #401 (comment) the other issue is also the fact that inside Welcome email there is a link to Connect App instead of TaaS App.

@cagdas001
Copy link
Contributor

cagdas001 commented Jul 30, 2021

that inside Welcome email there is a link to Connect App instead of TaaS App.

I thought it's what was expected since it's a regular new registration. That's why I suggest sending another email. If we're able to manipulate the redirect URI of the activation link, then yes, we may not need another mail. However, this will probably require the auth flow & services to get some updates in order to respect the link from the originator, which will affect the entire TC ecosystem.
I think there are too many places (i.e. apps) initiating a login/registration flow with different redirect URIs, so these changes to the auth flow/services may have serious impacts

@nikolay83
Copy link
Collaborator

@sachin-maheshwari
can you help?

@sachin-maheshwari
Copy link

@nikolay83 after activation, redirect is depends on from where your are initiating the signup. Example - https://www.topcoder.com/user-selection, here the "retUrl" is Connect - https://accounts-auth0.topcoder.com/?retUrl=https://connect.topcoder.com&regSource=tcBusiness&mode=signUp

@cagdas001
Copy link
Contributor

@sachin-maheshwari

This is the URL the app. redirects me. The redirect_uri is properly set:

Postman_2021-08-03_13-23-09

And this is what I see in the email:

chrome_2021-08-03_13-28-11

cc @nikolay83

@cagdas001
Copy link
Contributor

@sachin-maheshwari (in addition to the above comment) what I'm thinking, we're setting regSource=tcBusiness to indicate it's a customer login/registration. May this cause confusion (if tcBusiness value is assigned to any other specific app. that has the Connect App as redirect URI)? Which field does it use to find out the originator?

Here is the full URL that the app. redirects for auth, for your reference:
https://auth.topcoder-dev.com/login?state=hKFo2SBicHFfLWZhVlZ0MXhJVXFCalhsZDVfUGFOczNtUnJ2TqFupWxvZ2luo3RpZNkgNHBfNm1UYXVfNWYtQlRkamFhZ2h3czlzaC1Xd0FtVFijY2lk2SBCWFdYVVduaWxWVVBkTjAxdDJTZTI5VHcyWllOR1p2SA&client=BXWXUWnilVUPdN01t2Se29Tw2ZYNGZvH&protocol=oauth2&regSource=tcBusiness&returnUrl=https%3A%2F%2Fplatform.topcoder-dev.com%2Ftaas%2Fcreatenewteam%2Frole%2Fresult&mode=login&scope=openid%20profile%20email&response_type=code&response_mode=query&nonce=bmJIc3p3aUdtVGpvOXYwamg4WldqOU5GMWNmWVhZSzNzbjVGUEZ6RTZzTA%3D%3D&redirect_uri=https%3A%2F%2Faccounts-auth0.topcoder-dev.com%3FappUrl%3Dhttps%3A%2F%2Fplatform.topcoder-dev.com%2Ftaas%2Fcreatenewteam%2Frole%2Fresult&code_challenge=TAlb7YCK5LVrMHuooASEG0fhrYk-aoPXJFqEPYgzKj8&code_challenge_method=S256&auth0Client=eyJuYW1lIjoiYXV0aDAtc3BhLWpzIiwidmVyc2lvbiI6IjEuMTAuMCJ9

You can take a look at the parameters

@wdprice
Copy link
Author

wdprice commented Aug 10, 2021

Check this ticket as it is related : #435

we want to use regSource=taasApp instead of tcbusiness

@sdgun
Copy link

sdgun commented Aug 12, 2021

Verified in Dev, the user is not redirected to connect anymore, but since in dev the user is taken to start page after sign up, cannot verify proceeding to role intake submission after new user signs in while processing role selection.

@sdgun
Copy link

sdgun commented Aug 16, 2021

Verified in production

Screenshot (1)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants