Add Guest User Support with Download Restriction in Download Component#7
Open
NamasteIndia wants to merge 2 commits intorafsanbasunia:devfrom
Open
Add Guest User Support with Download Restriction in Download Component#7NamasteIndia wants to merge 2 commits intorafsanbasunia:devfrom
NamasteIndia wants to merge 2 commits intorafsanbasunia:devfrom
Conversation
|
@NamasteIndia is attempting to deploy a commit to the Rafsan's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces full support for guest users in the authentication flow and enforces frontend download restrictions accordingly. Key changes include:
AuthContext update:
Added loginAsGuest method to enable guest login without authentication tokens.
Guest users are marked with guest: true flag in the user state.
Guest user state is persisted in localStorage with no backend token.
SignIn component:

Added a “Continue as Guest” button allowing users to browse without signing in.
Guest login integrated cleanly alongside Telegram login.
Download component:
Guest users can browse content but are explicitly prevented from accessing download or external player options.
Fetching of download links is skipped for guests.
Guests see a clear message explaining downloads require sign-in.
Full download functionality remains for authenticated users.
Benefits:
Improves user onboarding/flexibility by allowing guest browsing.
Prevents unauthorized access to download features without complicating backend auth.
Maintains smooth UX with clear visual cues for guest limitations.
Please review the guest login flow and verify that download options behave as expected both logged in and as guest. Backend restrictions should still complement this frontend protection.