This guide will help you set up data synchronization for Calendar Notifications Plus using Supabase and PowerSync.
- A Supabase account
- A PowerSync account
- Access to the Calendar Notifications Plus app
- Sign up for Supabase and create a new project at https://supabase.com
- Once your project is created, navigate to the project dashboard
- Make note of your project URL and anon key (found in Project Settings > API)
- Migrate the database schema:
This will create the required
# From the root of this project cd supabase supabase link --project-ref <your-project-id> supabase db push
eventsV9table needed for event synchronization.
- Sign up for PowerSync at https://powersync.com
- Create a new instance
- Connect PowerSync to your Supabase database:
- Follow the connection instructions in the PowerSync dashboard
- Make sure to configure the necessary permissions and access controls
- Configure HS256 authentication:
- Go to your instance settings → Client Auth tab
- Under "JWT Audience (optional)", click the "+" button and add:
powersync - Under "HS256 authentication tokens (ADVANCED)", click the "+" button
- For KID, enter:
powersync - For HS256 secret, generate one:
openssl rand -base64 32 | tr '+/' '-_' | tr -d '=' - Copy the generated secret (you'll need it for the app)
- Click "Save and deploy"
- Open the Calendar Notifications Plus app
- Navigate to Data Sync Settings
- Configure the following:
- Supabase URL (from step 1.3)
- Supabase Anon Key (from step 1.3)
- PowerSync Instance URL (from step 2.2)
- PowerSync Token (paste the same HS256 secret from step 2.4)
Note: The app automatically generates short-lived JWT tokens (5 min expiry) using this secret. The JWTs include
sub(device ID),aud(powersync),iat, andexpclaims. Unlike development tokens, the HS256 secret doesn't expire - you only need to configure it once.
- After configuring all settings, the app should show "PowerSync Status: Connected"
- Try creating a new calendar event - it should sync to the remote database
- If using multiple devices, changes should propagate between them
- If sync isn't working, verify all credentials are entered correctly
- Check the PowerSync status in the app
- Ensure your Supabase and PowerSync instances are running and connected
- Review the app logs for any error messages
- JWT errors: Make sure the HS256 secret in the app matches exactly what's configured in PowerSync dashboard
- "Invalid token" errors: Verify the HS256 secret is properly configured under Client Auth → HS256 authentication tokens
- "Missing aud claim" errors: Add
powersyncto JWT Audience in the PowerSync dashboard (Client Auth → JWT Audience) - "Unexpected aud claim" errors: The JWT Audience in PowerSync dashboard must include
powersync