Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added google drive as a provider to sync notes. #257

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

NareshBiradar1
Copy link

@NareshBiradar1 NareshBiradar1 commented Aug 4, 2024

This pull request introduces Google Drive as a new provider for syncing notes. It includes updates to both the frontend and backend to support Google Drive integration.

Frontend Changes

  • Component Added: CloudSyncComponent
    • Allows users to select Google Drive, along with other cloud providers (Joplin Cloud, Dropbox, OneDrive), for note synchronization.
    • Clicking a provider button redirects users to the authentication endpoint for that provider.

Backend Changes

  • Google OAuth 2.0 Integration:
    • Added Passport.js configuration for Google OAuth 2.0 using passport-google-oauth20.
    • Configured Google Client ID, Client Secret, and callback URL.
    • Implemented serialization and deserialization of user sessions.

Changes Summary

  • Updated CloudSyncComponent to include Google Drive as a synchronization option.
  • Configured Google OAuth 2.0 authentication in Passport.js.
  • Added required environment variables for Google authentication.

Setup Instructions

  1. Environment Variables:
    • Ensure the following environment variables are set in your .env file:
      • GOOGLE_CLIENT_ID
      • GOOGLE_CLIENT_SECRET
  2. Backend Configuration:
    • Update your backend to handle the /auth/google/callback route for Google authentication.

Testing

  • Verify that the Google Drive button in the frontend redirects to Google's OAuth authentication page.
  • Confirm that the backend correctly processes the OAuth callback and authenticates users with Google.

Additional Notes

This update provides users with an additional option for syncing their notes across various cloud platforms, improving flexibility and integration options.

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