daily-code
daily-code copied to clipboard
Feat(371) - Tracks Behind Auth
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
RedirectToLogin Page and Hidden Download Button
Mobile UI
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
Can't this be done on server side? Why do you need to use client side auth?
@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)