Skip to content
This repository has been archived by the owner on Feb 11, 2025. It is now read-only.

feat(login): dummy page for authentication #12

Open
abhigyantrips opened this issue Dec 22, 2023 · 0 comments
Open

feat(login): dummy page for authentication #12

abhigyantrips opened this issue Dec 22, 2023 · 0 comments
Labels
🏁 status: ready for work Ready for work 💻 type: code For repository code related to the project 🌟 goal: addition To add a new feature

Comments

@abhigyantrips
Copy link
Member

abhigyantrips commented Dec 22, 2023

While we still work on the API side of things for authentication, we can go ahead with the frontend implementation so as to not block Noticeboard's development.

Authentication Flow:

  1. The user clicks on a button that shows "Login with Outlook"
  2. They are redirected to an API link (api.mitblr.club/...) which redirects them to Microsoft Authentication.
  3. Once verified, the Access/Refresh tokens are returned to our endpoint, which in turn saves them and returns a JWT for the app to use.
  4. Once returned, this JWT can be saved and utlized for all internal function calls.

Login Services (in services/):

  1. login() - Redirect to API. Store the returned JWT to Shared Preferences.
  2. validate(String jwt) - Validate the stored JWT against the API.

Login Controllers (in controllers/):

  1. validateOnResume() - Initiate validation on resuming app usage.
  2. validateOnStart() - Initiate validation on the app's first launch without a stored session. This function should be utilized while showing the user a splash screen on start.
  3. logout() - Flush the previously stored JWT. Note that our logins are persistent until the JWT expires, and this function exists only in case the user wants to terminate their session (through a UI button).

Layout (Made in PowerPoint): (graphic design is my passion)


image

Terms: https://mitblr.club/terms
Privacy Policy: https://mitblr.club/privacy

@abhigyantrips abhigyantrips added 🏁 status: ready for work Ready for work 💻 type: code For repository code related to the project 🌟 goal: addition To add a new feature labels Dec 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🏁 status: ready for work Ready for work 💻 type: code For repository code related to the project 🌟 goal: addition To add a new feature
Projects
None yet
Development

No branches or pull requests

1 participant