freeCodeCamp / classroom

BSD 3-Clause "New" or "Revised" License
145 stars 119 forks source link

Adding explicit opt-in option for Classroom App #479

Open GuillermoFloresV opened 9 months ago

GuillermoFloresV commented 9 months ago

Currently, there is no data sharing opt-in option integrated into Classroom. The app assumes that students have already opted-in to share their data with the app. We do not want this to be default behavior, and would rather have the student acknowledge that they have the option to opt-in/out on data sharing with Classroom. For a more in-depth dive into what this should look like, we will take #70 and build on the steps that it outlines.

This addition to the app will touch many files (Prisma schema, dashboards, join/on-boarding for a student, and more.) and therefore has been labelled as hard

Ideal flow:

  1. Classroom app gets a verified user from our IdP (which is Auth0) and hands off the request to Classroom's backend API.
  2. The backend API checks with freeCodeCamp API if the user has opted-in for sharing data with the Classroom app.
  3. The freeCodeCamp API can respond with status as the case may be.
  4. The Classroom UI app can display a message which is either the user had opted-in already or a link to the settings page on freeCodeCamp where they can check off a box to opt-in.
  5. The Classroom UI and Backend can repeat step 2 as many times as needed to confirm when the user has opted-in.

Expected behavior When students first join the Classroom app, we want to make sure that they have given consent for their freeCodeCamp course completion data to be shared with us. This option should exist on their fCC settings page (based on #70) and will simply exist as a flag on their profile inside of the Classroom App. Students should not be able to consent, or revoke consent on the classroom app and should instead hold control of it inside of their fCC profile.

If a student has already opted-in to data sharing, they should not be prompted to do so again, but if they have not, we can have a pop-up appear whenever a student logs into classroom/attempts to join a new class.

A student can still join Classroom, without sharing data. This will be reflected in their profile inside of a classroom and inside of the greater classroom app.

### Tasks
- [ ] Create mock API endpoint that will mimick the response from auth0