Skip to content

Add Guest User Support with Download Restriction in Download Component#7

Open
NamasteIndia wants to merge 2 commits intorafsanbasunia:devfrom
NamasteIndia:master
Open

Add Guest User Support with Download Restriction in Download Component#7
NamasteIndia wants to merge 2 commits intorafsanbasunia:devfrom
NamasteIndia:master

Conversation

@NamasteIndia
Copy link
Copy Markdown

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:
image

Added a “Continue as Guest” button allowing users to browse without signing in.
Guest login integrated cleanly alongside Telegram login.
Download component:

image

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.

@vercel
Copy link
Copy Markdown

vercel bot commented Jun 14, 2025

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant