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

Add initial enrolment flow #9

Merged
merged 41 commits into from
Sep 13, 2024
Merged

Add initial enrolment flow #9

merged 41 commits into from
Sep 13, 2024

Conversation

mpgxvii
Copy link
Member

@mpgxvii mpgxvii commented Jul 18, 2024

  • Adds initial study landing page, eligibility, registration, verification, and consent flow
  • Eligibility and consent forms are on separate ts files, support needs to be added to pull these from external repo/Github
  • Add initial oauth consent module that would allow the user to consent to access to a resource server which will then allow an access token to be requested from hydra
  • This also allows claims to be mapped from the kratos identity (which has the MP information) to the hydra token

Solves:

Copy link
Member

@yatharthranjan yatharthranjan left a comment

Choose a reason for hiding this comment

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

Thanks, excellent work!

Please take a look at some comments below. Most, if not all, of these can be done in separate issues/PRs later.

As discussed before, it would be good to abstract most of the input types so they can be reused across various pages.

pages/consent.tsx Outdated Show resolved Hide resolved
pages/eligibility.tsx Show resolved Hide resolved
id={question.field_name}
name={question.field_name}
type={question.field_type}
required={isRequired}
Copy link
Member

Choose a reason for hiding this comment

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

need to support various input types

implement your own custom user interface.
</P>
<CardTitle>RADAR Base Ory!</CardTitle>
<P>Welcome to the RADAR Base self-enrolment portal.</P>
Copy link
Member

Choose a reason for hiding this comment

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

I think these should be customisable based on the project

pages/index.tsx Outdated
href="https://www.ory.sh/docs/get-started"
testid="get-started"
testid="study"
href="/study"
Copy link
Member

Choose a reason for hiding this comment

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

should this be project-specific? like/study?ref=STAGING_PROJECT or /study/STAGING_PROJECT

return (
<>
<Head>
<title>Profile Page</title>
Copy link
Member

Choose a reason for hiding this comment

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

I think we need something generic here that can parse as many Identifiable questionnaires as necessary

flow={flow}
/>
<div>
<H3>Profile Settings</H3>
Copy link
Member

Choose a reason for hiding this comment

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

What would happen to the apps and others that are based on email when email is changed? Would they logout? If so we should show a warning on updating of emails

Copy link
Member Author

Choose a reason for hiding this comment

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

Will test with aRMT integration.

pages/study.tsx Outdated
question.select_choices_or_calculations.map((info, idx) => (
<div key={`${index}-${idx}`}>
<label className="inputLabel">{info.code}</label>
<InnerCard>{info.label}</InnerCard>
Copy link
Member

Choose a reason for hiding this comment

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

We should also store study info if there are any input types apart from info or descriptive text.

</Head>
<MarginCard>
<CardTitle>Create account</CardTitle>
<CardTitle>Create Your Account</CardTitle>
Copy link
Member

@yatharthranjan yatharthranjan Aug 8, 2024

Choose a reason for hiding this comment

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

We need explicit consent for RADAR-Base specific terms and conditions here before an account can be created, these should also be recorded in identity traits.

Copy link
Member

@this-Aditya this-Aditya left a comment

Choose a reason for hiding this comment

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

Hi Pauline,

Overall, this PR looks excellent. I’ve left some comments focused on minor enhancements. Please take a look at these comments and make any adjustments you deem appropriate.

pages/eligibility.tsx Show resolved Hide resolved
pages/eligibility.tsx Outdated Show resolved Hide resolved
pages/registration.tsx Show resolved Hide resolved
pages/study.tsx Outdated Show resolved Hide resolved
@yatharthranjan
Copy link
Member

@mpgxvii Can you also run Prettier to fix the formatting issues?

Copy link
Member

@Bdegraaf1234 Bdegraaf1234 left a comment

Choose a reason for hiding this comment

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

Great work Pauline,

I think the others reviewed this better than I could have, LGTM

@Bdegraaf1234 Bdegraaf1234 marked this pull request as draft August 19, 2024 14:47
@mpgxvii mpgxvii marked this pull request as ready for review September 13, 2024 13:41
@mpgxvii mpgxvii merged commit cc6c8be into dev Sep 13, 2024
2 checks passed
@mpgxvii mpgxvii deleted the feat/initial-components branch September 13, 2024 13:42
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.

4 participants