Skip to content
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

feat: signup also saves into list of previous logged in orgs #3165

Merged
merged 17 commits into from
Sep 16, 2022

Conversation

kimskimchi
Copy link
Contributor

After user successfully signs up and logs out from the dashboard,
they will see the new org in the list of visited orgs on login.infrahq.com/login/organizations (using cookies).

@kimskimchi kimskimchi marked this pull request as ready for review September 9, 2022 13:32
@@ -53,6 +55,18 @@ export default function Signup() {
let created = await res.json()

window.location = `${window.location.protocol}//${created?.organization?.domain}`
let visitedOrgs = cookies.get('orgs') || []
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is the same logic as in the login page, it would be nice to add a shared helper function (maybe in the libs folder) so if we want to change this in the future we know there is one central place to do so.

Copy link
Collaborator

@BruceMacD BruceMacD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, other than the one comment 👍

ui/pages/login/index.js Outdated Show resolved Hide resolved
Co-authored-by: Bruce MacDonald <brucewmacdonald@gmail.com>
@kimskimchi kimskimchi enabled auto-merge (squash) September 16, 2022 19:34
@kimskimchi kimskimchi merged commit 5b9d0db into main Sep 16, 2022
@kimskimchi kimskimchi deleted the kimskimchi/ui-6 branch September 16, 2022 19:35
jmorganca pushed a commit that referenced this pull request Sep 19, 2022
* feat: prelogin page that lists orgs that were logged into, using cookies

* improve: small

* improve: origin to host, use //

* improve: small

* improve: small

* improve: push package.json

* improve: reorganized imports

* improve: small

* improve: small

* improve: small

* improve: small

* improve: small

* feat: signup also saves into list of previous logged in orgs

* improve: helper fn

* improve: small

Co-authored-by: Bruce MacDonald <brucewmacdonald@gmail.com>

Co-authored-by: Bruce MacDonald <brucewmacdonald@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants