FightPandemics / FightPandemics/FightPandemics-Telegram

FP Chatbot on Telegram- Login integration and Signup flow

Open
#5 3 comments 0 reactions 1 assignee Claimed by @kumudchauhan View on GitHub
ready for engineering
Dominant language
Python
Stars
1
Forks
6
PR merge metrics
No merged PRs in 30d

Description

**User Story**: As a FightPandemics chatbot user, if I am not logged in/signed up and if I am trying to View My Posts, View My Profile, Comment and See Comments, then I should be asked to Login/Signup along with an option to Skip.

As a user, once I login or sign up, I want to continue with what I had been doing before needing to login so that I can complete what I was trying to do (and don't get confused).

**Use Case 1**: User taps on Login/Signup button.

When I tap on the login/signup button,
Then, I should be asked to enter my email address,
When I enter my email address,
Then the bot should ask for my password,
When I enter the password and if the password and email address are correct,
Then I should be logged in.
OR
When I enter the password and if the password and email does not match,
Then I should see the following message : "Sorry your password or username was incorrect. Please try to login again." along with 3 buttons "Login" "Go back to Main Menu" "Skip"

During login process, there needs to be a way to track what the user was doing before the login/authentication process so that they can go back to what they were trying to do.

**Example:**
- If they were trying to create a post, they would then go to the create post flow after logging in.
- If they were trying to comment, they will get a prompt to add their comment and associate it to the original message they were trying to comment to after they are logged in.
- If they were trying to view a profile, they will the go to the profile they were trying to view.

**Areas needing login:**
- Create Post
- Comment
- View Author Profile
- View My Profile
- View my posts
- Like (TBD if this is on chatbot)

**Use Case 2**: User taps on Skip button.

When I tap on the skip button,
Then I should see the following message "Without Login/Signup you wont be able to comment, create a post or connect." as well as the following buttons:
- "Login/Signup" (they will reloop through the login process)
- "Skip and go back" > this will take user back to the page that they were viewing when they were prompted to login
(they will not be able to go to the next step in the flow as if they were logged in)
- "Skip and go to Main Menu" > take user to Main Menu: https://github.com/FightPandemics/FightPandemics-Telegram/issues/3

**Wireframe**: [Miro board](https://miro.com/app/board/o9J_kp0wo_Y=/?moveToWidget=3074457349121133929&cot=12)
**Notion Documentation**: https://www.notion.so/fightpandemics/Chatbots-Task-Board-bfe76e786f78437cba348739899cf7da?p=630e6043b7864146b87ce8857608e352

**API Integration**
Login: POST /api/auth/login
Signup: POST /api/auth/signup

**Acceptance Criteria**:
- When user clicks on "Login/Signup" then he should be redirected to FP login page.
- Once user is logged in successfully, then the user should be able continue what they were doing before logging in (dependent on user behavior)
> - create a post flow if they had clicked this before logging in
> - comment on a post if they had clicked this before logging in (will need to make sure comment tagged to correct post they clicked on before logging in)
> - view author's profile from the post or comment based on what they had clicked on before logging in

- When user clicks on "Skip" then the bot should show a generic message mentioned in the User case 2.
> - if user clicks on skip and then "Login/Signup," then user will go through the process again
> - if user clicks on "Skip and go back", then user will go back to the prior message they were on before being prompted to login
> - if user clicks on "Skip and go to Main Menu", then user will see the Main Menu buttons.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.