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

Guest login for Nyamrub #21

Open
6 tasks done
Karma-Tsering opened this issue Nov 25, 2024 · 12 comments
Open
6 tasks done

Guest login for Nyamrub #21

Karma-Tsering opened this issue Nov 25, 2024 · 12 comments
Assignees

Comments

@Karma-Tsering
Copy link
Contributor

Karma-Tsering commented Nov 25, 2024

Description

Enable users to contribute and validate data using a guest login, eliminating the need for social login. This ensures accessibility for users without social media accounts, simplifies the login process, and encourages broader participation.

Implementation plan

  1. Common User for All Contributions and Validations
  2. Unique Guest User for Each Individual
  3. Hybrid Guest User with Optional Upgrade

Going for the 3rd one as it fits best for nyamrub.

Subtask

Backend

  • Update user model
  • Assign data to guest user
  • Implement logic to convert a guest user to an authenticated user while preserving data.

Frontend

  • Automatically create a guest user if no registered user exists.
  • Store the guest user session using cookies or session storage, as appropriate.
  • Handle user state transitions when a guest user registers or logs in.
@Karma-Tsering Karma-Tsering converted this from a draft issue Nov 25, 2024
@Karma-Tsering Karma-Tsering self-assigned this Nov 25, 2024
@Karma-Tsering
Copy link
Contributor Author

I chose not to set an expiration for guest users to avoid losing their contributions.

@ta4tsering ta4tsering moved this from IN PROGRESS to TESTING in Monlam Application Dev Nov 27, 2024
@Karma-Tsering Karma-Tsering moved this from TESTING to IN PROGRESS in Monlam Application Dev Nov 28, 2024
@Karma-Tsering
Copy link
Contributor Author

Karma-Tsering commented Nov 28, 2024

Updated tasks

  • Get a name input from user for guest user
  • Delete guest user if existing user login

@Karma-Tsering
Copy link
Contributor Author

This has been reviewed by kusang and @Tendolls can test it on https://staging.nyamrub.monlam.ai/

@Karma-Tsering Karma-Tsering moved this from IN PROGRESS to TESTING in Monlam Application Dev Dec 2, 2024
@Karma-Tsering Karma-Tsering moved this from TESTING to IN PROGRESS in Monlam Application Dev Dec 2, 2024
@Karma-Tsering
Copy link
Contributor Author

Need to update login with guest ui

@kaldan007
Copy link

no need of user name
signin as guest needs to be button
sign out not redirecting

@tenkus47
Copy link
Contributor

tenkus47 commented Dec 4, 2024

@kaldan007 @Karma-Tsering Nyamrub web will be available at
production: link
staging: link

@Karma-Tsering
Copy link
Contributor Author

Karma-Tsering commented Dec 4, 2024

Update task

  • no need of user name
  • signin as guest needs to be button
  • sign out not redirecting

@kaldan007 kaldan007 moved this from IN PROGRESS to TESTING in Monlam Application Dev Dec 5, 2024
@kaldan007 kaldan007 assigned Tendolls and unassigned Karma-Tsering Dec 5, 2024
@Tendolls
Copy link

Tendolls commented Dec 6, 2024

@kaldan007 The sign in as a guest icon isn't implemented .
The username isn't removed.
The apple id log in leads to a formation of a new id eg. refer to the pic below.
Image

@tenkus47
Copy link
Contributor

tenkus47 commented Dec 6, 2024

Incase of apple login user are free to choose whether they want to share there email or not.

When using Apple's Sign in with Apple via Auth0, users can choose to share their actual email address or use Apple's private relay service to keep their email address anonymous.

Apple’s Private Relay: If the user opts for the private relay, they are provided with a unique anonymized email address (e.g., [email protected]), which forwards emails to their actual email address.

Email Availability: The private relay email address is only provided during the initial login. Once the user has signed in with Apple, subsequent logins will not reveal the actual email address again, and the relay address may be used instead.

Initial Permission: The user’s decision to share their email address or use the private relay depends on their permission during the first sign-in process. If they opt to share their real email, it will be provided by Apple in the token payload; if they opt for the private relay, you’ll receive the anonymized email address.

This means that you only have access to the email (either real or relay) during the initial login, and it is not updated or available in subsequent logins unless explicitly provided by the user.

Researched by @Karma-Tsering
Verified by @tenkus47

@tenkus47
Copy link
Contributor

tenkus47 commented Dec 6, 2024

Possible solution:

  • we can show alternative username or something like a Avatar only on anonymous apple id.
  • hide the apple id if its relayed service

@Karma-Tsering
Copy link
Contributor Author

Guest login has not yet been merged into the staging branch as I was waiting for Tenzin's response. After discussing it with Tenzin this morning, we both agreed on implementing anonymous login. Currently, it is under review by @tenkus47.

I will work on finding a solution for the Apple username issue.

@tenkus47
Copy link
Contributor

tenkus47 commented Dec 6, 2024

@Karma-Tsering the PR has been reviewed and merged for guest login issue

@kaldan007 kaldan007 moved this from TESTING to DONE in Monlam Application Dev Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: DONE
Development

No branches or pull requests

4 participants