Skip to content

Feature Request: Add “Sign in with Google” for User Profiles #21

Description

@Prateekiiitg56

Is your feature request related to a problem? Please describe.

With the upcoming Profile section for viewing past trips, users will need a simple and secure way to access their personal data.
Currently, GoPredict doesn’t have any authentication mechanism, meaning there’s no way to store or retrieve user-specific trip history across sessions.

This limits personalization and prevents multiple users from securely managing their own data.

Describe the solution you'd like

Integrate Google Sign-In (via OAuth 2.0) to allow users to log in using their Google account.
Once authenticated, users can access their own Profile, view past trips, and store predictions securely under their account.

Core functionalities:

Google OAuth login (Sign in / Sign out)

Session management (keep users logged in)

User-specific storage (separate profile and trip data for each user)

Basic profile display (name, email, profile picture)

Proposed Approach

Backend Integration

Use Google’s OAuth 2.0 API or a library like google-auth or firebase-auth for Python/JS backend.

Store user credentials (securely) and associate them with their trip data.

Frontend Implementation

Add a “Sign in with Google” button on the landing page or Profile section.

After login, display user details (profile picture, name, email) on the navbar or dashboard.

Data Linking

Each user’s predictions and history will be stored separately.

Modify the data-saving logic so that every record links to a user_id (from Google).

Security

Use secure tokens (JWT or Firebase ID tokens) for session management.

Implement logout and token expiration handling.

Benefits

Provides a personalized experience for every user.

Ensures data privacy — users only see their own past trips.

Simplifies onboarding — no need to create a new account.

Sets the foundation for multi-user functionality and cloud sync.

Additional Context

This feature will work hand-in-hand with the proposed Profile Section (#) to make GoPredict a more interactive and user-friendly platform.
In the future, it could also enable:

Cross-device syncing of predictions

Analytics dashboards per user

API access for authenticated users

@harshitaphadtare Assign this to me

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions