daily-code icon indicating copy to clipboard operation
daily-code copied to clipboard

Feat(371) - Tracks Behind Auth

Open YuZaGa opened this issue 1 year ago • 2 comments

PR Fixes:

@hkirat

  • 1 Visual Changes to RedirectToLogin page. In smaller screen text was getting mushed up. Sorted that out.
  • 2 User won't be able to access the track's content but will be able to see the cards (title and description). IMO this approach seems better than hiding all the tracks behind auth. Unless hiding the tracks is important rather than just preventing access to them.
  • 3 the explore button gets replaced with a Locked button with a lock sign.
  • 4 If the user goes into individual tracks(even through an URL), they are shown the RedirectToLogin (pre-existing) component.
  • 5 In AppBar, the Download button gets disabled when user is not authenticated.

Locked buttons image RedirectToLogin Page and Hidden Download Button image Mobile UI image

Resolves #[371]

Checklist before requesting a review

  • [x] I have performed a self-review of my code
  • [x] I assure there is no similar/duplicate pull request regarding same issue

YuZaGa avatar May 01 '24 09:05 YuZaGa

Can't this be done on server side? Why do you need to use client side auth?

nimit9 avatar May 01 '24 09:05 nimit9

@nimit9 I went along with the pre-existing code(found similar implementation in one of the pages) and since we already had a status property, it made sense to implement it this way... Login + checking for authentication on server seems redundant as there would be more attempts to check for authentication for pages which we need to rule out than just login.(Public site and stuff)

YuZaGa avatar May 01 '24 10:05 YuZaGa