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

[$300] Project UBahn | Update Login to use accounts.topcoder.com #630

Closed
wdprice opened this issue Aug 12, 2020 · 32 comments
Closed

[$300] Project UBahn | Update Login to use accounts.topcoder.com #630

wdprice opened this issue Aug 12, 2020 · 32 comments

Comments

@wdprice
Copy link

wdprice commented Aug 12, 2020

currently login flow goes through topcoder.auth0.com

Need to use accounts.topcoder.com for proper cross-site platform handling.

@wdprice wdprice added the enhancement New feature or request label Aug 12, 2020
@wdprice wdprice added this to the v1.01 - Stability Release milestone Aug 12, 2020
@callmekatootie
Copy link
Collaborator

Note to self - check out Laushcer or Vorbote for how we did this...

@callmekatootie
Copy link
Collaborator

@cwdcwd Is this available on npm - https://github.com/appirio-tech/accounts-app ? Lauscher seems to have copied code from this repo (some minification issues). Need to know if I should go the same way in this app or if there's a module that I can make use of...

@cwdcwd
Copy link
Contributor

cwdcwd commented Sep 15, 2020

let's loop in @sachin-maheshwari for how best to incorporate the new login stuff. @sachin-maheshwari can we publish the new login component to npm for inclusion in our apps?

@sachin-maheshwari
Copy link

@cwdcwd I am investigating, will share my thoughts.

@sachin-maheshwari
Copy link

sachin-maheshwari commented Sep 15, 2020

As i explored I think, we need to authenticate and authorize in this way - https://github.com/appirio-tech/connect-app/blob/test/auth0lib/src/components/AuthenticatedComponent.jsx
Whole "new Auth flow" releated changes we can find here - appirio-tech/connect-app#4082

In general, for authentication, currently we are using account-app (that is authenticating and setting topcoder cookies (JWT tokens) in browsers).

In authorization, we have common logic(lib) to read and validate that cookies (JWT token). For example - "New Auth Flow" https://github.com/topcoder-platform/tc-auth-lib/blob/dev/src/connector-wrapper.js#L68
And in current flow - https://github.com/appirio-tech/accounts-app/blob/dev/connector/connector-wrapper.js#L64

@cwdcwd
Copy link
Contributor

cwdcwd commented Sep 15, 2020

@sachin-maheshwari are any of these pieces publishable via npm as modules so we can drop them into our code easily?

@sachin-maheshwari
Copy link

@cwdcwd
Copy link
Contributor

cwdcwd commented Sep 15, 2020

I'm not a big fan or references by git url. Can I add a github action to publish "tc-auth-lib": "git+https://github.com/topcoder-platform/tc-auth-lib.git#dev" out to our NPM modules?

@sachin-maheshwari
Copy link

You can publish but some code clean-up required (like web-assets folder not related to this and iframe and refresh token logic).

@cwdcwd
Copy link
Contributor

cwdcwd commented Sep 17, 2020

that's fine. we'll just do another release once that happens.I'll add a github action to publish

@callmekatootie
Copy link
Collaborator

Bump. Just checking in if we have the module to use

@cwdcwd
Copy link
Contributor

cwdcwd commented Sep 21, 2020

@sachin-maheshwari do you care if I change the package to be @topcoder-platform/tc-auth-lib ?
I want to publish it with the rest of our topcoder-platform modules

@cwdcwd
Copy link
Contributor

cwdcwd commented Sep 21, 2020

@sachin-maheshwari I made a PR here for this

@sachin-maheshwari
Copy link

NP, I'll take care. Thanks!

@cwdcwd
Copy link
Contributor

cwdcwd commented Sep 22, 2020

thanks @sachin-maheshwari !
@callmekatootie I published a release here on NPM

@callmekatootie callmekatootie changed the title Update Login to use accounts.topcoder.com [$300] Project UBahn | Update Login to use accounts.topcoder.com Sep 23, 2020
@cwdcwd
Copy link
Contributor

cwdcwd commented Sep 23, 2020

Contest https://www.topcoder.com/challenges/30143227 has been created for this ticket.

This is an automated message for lazybaer via Topcoder X

@callmekatootie
Copy link
Collaborator

@ all Ticket OPEN FOR PICKUP

Task Details:

@narekcat narekcat self-assigned this Sep 23, 2020
@cwdcwd
Copy link
Contributor

cwdcwd commented Sep 23, 2020

Contest https://www.topcoder.com/challenges/30143227 has been updated - it has been assigned to Narekvar90.

This is an automated message for lazybaer via Topcoder X

@callmekatootie
Copy link
Collaborator

callmekatootie commented Sep 23, 2020

@narekcat Just a FYI - the outcome of your changes will result in the user being redirected to accounts.topcoder(-dev).com and not to auth0 if they are not logged in.

You can visit http://lauscher.topcoder-dev.com/ to get an idea about how the app behaves when we use accounts.topcoder for login instead of auth0

(Laushcer is a different app - only mentioning it here to give you a reference of how to integrate with accounts.topcoder instead of auth0)

@narekcat
Copy link
Contributor

@callmekatootie Okay.

@narekcat
Copy link
Contributor

@callmekatootie I am actively working on this issue, I just need additional 24 hours to finish it. Is it ok ?

@callmekatootie
Copy link
Collaborator

I understand. No worries.

@narekcat
Copy link
Contributor

Thanks.

@narekcat
Copy link
Contributor

@callmekatootie Hi, I am still actively working on this issue, but it is much harder then I thought. I need more time to finish it. What you think about that ?

@callmekatootie
Copy link
Collaborator

Should be fine - however, I hope you will submit in the next 24 hours else I will have to explore other options

@narekcat
Copy link
Contributor

I'll do my best to finish it in time, if I couldn't I'll put it back.

@narekcat narekcat removed their assignment Sep 27, 2020
@callmekatootie
Copy link
Collaborator

@narekcat Status check

@callmekatootie
Copy link
Collaborator

My bad. Didn't see you marked it as open for pickup

@cwdcwd
Copy link
Contributor

cwdcwd commented Sep 28, 2020

Contest https://www.topcoder.com/challenges/30143227 has been updated - callmekatootie has been unassigned.

This is an automated message for lazybaer via Topcoder X

@cwdcwd
Copy link
Contributor

cwdcwd commented Sep 28, 2020

Contest https://www.topcoder.com/challenges/30143227 has been updated - it has been assigned to callmekatootie.

This is an automated message for lazybaer via Topcoder X

@cwdcwd
Copy link
Contributor

cwdcwd commented Oct 8, 2020

Payment task has been updated: https://software.topcoder.com/review/actions/ViewProjectDetails?pid=30143227

This is an automated message for lazybaer via Topcoder X

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

5 participants